giotto-ai / tutorial_mapper

Other
13 stars 7 forks source link

KeyError #10

Open good-demo opened 1 year ago

good-demo commented 1 year ago

Thanks for your repo

when I use this code """"

configure Mapper pipeline

pipeline = make_mapper_pipeline( filter_func=None, cover=CubicalCover(), clusterer=DBSCAN())

plot the graph arising from applying the pipeline

fig = plot_mapper_graph_from_pipeline(pipeline) """" it return error

KeyError Traceback (most recent call last) Cell In [9], line 8 2 pipeline = make_mapper_pipeline( 3 filter_func=None, 4 cover=CubicalCover(), 5 clusterer=DBSCAN()) 7 # plot the graph arising from applying the pipeline ----> 8 fig = plot_mapper_graph_from_pipeline(pipeline)

Cell In [7], line 13, in plot_mapper_graph_from_pipeline(pipe) 10 graph = pipeline.fit_transform(coords) 12 # get cluster member indices ---> 13 node_elements = graph["node_metadata"]["node_elements"] 15 # configure choice of layout (x,z values) 16 layout = np.array([np.mean(coords[el], axis=0)[[0,2]] for el in node_elements])

KeyError: 'Attribute does not exist'