isaacrob / DEN

Interpretable Visualizations with Differentiating Embedding Networks
MIT License
8 stars 1 forks source link

Expected output? #1

Open jpsml opened 3 years ago

jpsml commented 3 years ago

Hello, I executed your code and got the output below in the end, is this the expected result?

this is epoch 9 100% (461 of 461) |###################################################################################################################################################################################| Elapsed Time: 0:00:42 Time: 0:00:42 training loss: 0.03367720527368357 found expected distance between related points as 1.3593897591718753 found 9 candidate clusters running k-means.. applying KNN filter.. found 1 clusters training cluster subnet to predict spectral labels 100% (50 of 50) |#####################################################################################################################################################################################| Elapsed Time: 0:00:07 Time: 0:00:07 fine-tuning whole end-to-end network 100% (50 of 50) |#####################################################################################################################################################################################| Elapsed Time: 0:01:14 Time: 0:01:14 100% (3 of 3) |#######################################################################################################################################################################################| Elapsed Time: 0:00:00 Time: 0:00:00 Pass average_method=geometric as keyword args. From version 1.0 (renaming of 0.25) passing these as positional arguments will result in an error NMI of cluster labels with y: 0.0 Pass average_method=geometric as keyword args. From version 1.0 (renaming of 0.25) passing these as positional arguments will result in an error NMI of network predictions with y: 0.0 number of predicted classes did not match number of clusters so not computing accuracy, correct 10 vs 1

isaacrob commented 2 years ago

Hello @jpsml! I am just now discovering that GitHub sends notifications on things, so sorry for missing your issue!

That is not the expected output! See this Colab notebook for an example :)

Since I published this module, some libraries have changed so that the code no longer runs as-is, for example SHAP has changed so that my summarize_differentiating_features method no longer gives the expected output, and normalized_mutual_info_score requires a keyword argument for average_method='geometric' instead of just a positional argument. When I wrote this I should have added a requirements.txt that specified versions to address issues like this.

For the time being I actually don't think I'm going to fix these problems. I wrote this code and paper in a hurry before starting my first job in industry and now looking back on it I think in order to feel good about this codebase I'd have to essentially write it from scratch, so in my mind it doesn't really make sense to solve these small problems. I'm honestly somewhat embarrassed to have it out there hahaha :)

I do still think the ideas in the paper are valid, and the results are valid, but this codebase is not great. I don't know why you got those results, they don't match the results from running the same code in the notebook which is for me both a relief and a concern.

If you have a specific use case in mind for this work I'd be happy to discuss and maybe we could distill down what would be relevant. I also may just completely rewrite this code now that I have a better understanding of what code that other people interact with should look like :)