You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to visualise the tree of the mushroom_examples you provided :
`from future import print_function
from future import unicode_literals
from future import absolute_import
from future import division
from random import shuffle
from random import seed
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.feature_extraction import DictVectorizer
from sklearn.metrics import adjusted_rand_score
from concept_formation.cobweb import CobwebTree
from concept_formation.cluster import cluster
from concept_formation.datasets import load_mushroom
from concept_formation.visualize import visualize_clusters
tree = CobwebTree()
mushrooms_no_class = [{a: mushroom[a] for a in mushroom
if a != 'classification'} for mushroom in mushrooms]
clusters = next(cluster(tree, mushrooms_no_class))
visualize_clusters(tree, clusters)`
The page is opening in the browser but the tree is not shown. As you can see on the screenshot, I get the following warning: Can't find the d3 library. Currently the viz assumes it can get it from a CDN on the internet.
The text was updated successfully, but these errors were encountered:
I use Python version 3.7.7.
I tried to visualise the tree of the mushroom_examples you provided :
`from future import print_function
from future import unicode_literals
from future import absolute_import
from future import division
from random import shuffle
from random import seed
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.feature_extraction import DictVectorizer
from sklearn.metrics import adjusted_rand_score
from concept_formation.cobweb import CobwebTree
from concept_formation.cluster import cluster
from concept_formation.datasets import load_mushroom
from concept_formation.visualize import visualize_clusters
seed(0)
mushrooms = load_mushroom()
shuffle(mushrooms)
mushrooms = mushrooms[:150]
tree = CobwebTree()
mushrooms_no_class = [{a: mushroom[a] for a in mushroom
if a != 'classification'} for mushroom in mushrooms]
clusters = next(cluster(tree, mushrooms_no_class))
visualize_clusters(tree, clusters)`
The page is opening in the browser but the tree is not shown. As you can see on the screenshot, I get the following warning: Can't find the d3 library. Currently the viz assumes it can get it from a CDN on the internet.
The text was updated successfully, but these errors were encountered: