Closed peach-lucien closed 3 years ago
@peach-lucien is this all what you wanted to add? So we won't use MI anymore, but only VI? Don't merge that yet, I'll clean it up a bit before we do! Could you just give me the place where you took the entropy function? Thanks!
@peach-lucien is this all what you wanted to add? So we won't use MI anymore, but only VI? Don't merge that yet, I'll clean it up a bit before we do! Could you just give me the place where you took the entropy function? Thanks!
I took the entropy function from the MI measure. https://github.com/scikit-learn/scikit-learn/blob/0fb307bf3/sklearn/metrics/cluster/_supervised.py#L570
The issue here is that I've implemented the normalised VI, but normalised using the joint entropy. In previous versions, the VI was normalised using n*log(n) instead. It seems that there are different methods in literature.
I need to implement the other directed constructor methods - currently there is one implemented. But the matlab version of stability shows other implementations. I will get onto this soon
Ah cool, then do
from sklearn.metric.clusters import entropy
instead of copy pasting the function ;)
@michaelschaub do you remember what is the convention in markov stability for normlisation of VI? tbh, I have never looked at that in details
In the Matlab version the normalization is the simplest, i.e., VI_norm = VI / log(N).
For a large number of other variants (and a paper discussing them) see here: https://github.com/Hoosier-Clusters/clusim
@peach-lucien , I have cleanup up the directed constructor, could you add a simple example in the example folder, to see if it works? Thanks!
In fact, let me merge this, and we do another one with more examples.
created constructor for directed markov stability- potentially broken.