Skip to content

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

Description

@Adahn

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions