I a bit confused regarding the Jaccard similarity score. The example given
on :
http://scikit-learn.org/stable/modules/generated/sklearn.metrics.jaccard_similarity_score.html#sklearn.metrics.jaccard_similarity_score
>>> import numpy as np>>> from sklearn.metrics import
>>> jaccard_similarity_score>>> y_pred = [0, 2, 1, 3]
I am assuming that here each dimension is a label and the entry
represents how many times that label appears. Also I am assuming that
the each entry has weight of 1.
>>> y_true = [0, 1, 2, 3]
Then, A \intersection B (y_pred and y_true) will be = 1 + 1 + 3 = 5
and A \union B will be = 3 + 3 + 3 = 9
How is the jaccard similarity = 0.5?
>>> jaccard_similarity_score(y_true, y_pred)0.5>>>
>>> jaccard_similarity_score(y_true, y_pred, normalize=False)2
--
sp
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general