HelmholtzAI-Consultants-Munich / fg-clustering

Explainability for Random Forest Models.
https://forest-guided-clustering.readthedocs.io/
MIT License
26 stars 7 forks source link

NameError: name 'warnings' is not defined #17

Closed l0renor closed 1 year ago

l0renor commented 1 year ago

Hi, I tried running your regression example on my data.

There Clustering was instable:

Output:

For number of cluster 6 the Jaccard Index is 0.10070918538275783 Clustering is instable, no score computed!

100%|██████████| 6/6 [01:19<00:00, 13.27s/it]

For number of cluster 7 the Jaccard Index is 0.09384712339619859 Clustering is instable, no score computed!

After Step 6 I got the following Error:

NameError: name 'warnings' is not defined which came from forest_guided_clustering.py:109

Am I doing something wrong or is there an error in the library ?

When I continued the tutorial with fgc.plot_global_feature_importance() The error AttributeError: 'FgClustering' object has no attribute 'p_value_of_features' occured. This should be due to the previous error I think.

Additionally:

Is there something I can do to produce more stable clusters.

lisa-sousa commented 1 year ago

Hi,

thanks for pointing that out. We simply had forgotten to import the warnings package in on script. The package is now updated. Could you update the package to the newest version "1.0.2".

Regarding the clustering stability. This can be caused by different issues: