Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualisation problem - Can't find the d3 library #91

Open
Adahn opened this issue May 12, 2020 · 0 comments
Open

Visualisation problem - Can't find the d3 library #91

Adahn opened this issue May 12, 2020 · 0 comments

Comments

@Adahn
Copy link

Adahn commented May 12, 2020

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.
Screenshot from 2020-05-12 11-51-50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant