|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.nlp.uned.weps.evaluation.Measures
public class Measures
The Class Measures contains a set of static methods that implement different clustering measures and combined measures. Reference: E. Amigó, J. Gonzalo and J. Artiles. Evaluation metrics for clustering tasks: a comparison based on formal constraints. Technical report to be published in http://nlp.uned.es
Field Summary | |
---|---|
static java.lang.String |
BCUBED_EXT_PRECISION
The BCUBE d_ EX t_ PRECISION. |
static java.lang.String |
BCUBED_EXT_RECALL
The BCUBE d_ EX t_ RECALL. |
static java.lang.String |
BCUBED_F05
The BCUBE d_ f05. |
static int |
FOLKES_AND_MALLOWS
The Constant FOLKES_AND_MALLOWS. |
static java.lang.String |
INVERSE_PURITY
The INVERS e_ PURITY. |
static int |
JACCARD_COEFFICIENT
The Constant JACCARD_COEFFICIENT. |
static java.lang.String |
MULTIPLICITY
The MULTIPLICITY. |
static java.lang.String |
PAIRS_FOLKES_AND_MALLOWS
|
static java.lang.String |
PAIRS_JACCARD_COEFFICIENT
|
static java.lang.String |
PAIRS_RAND_STATISTIC
|
static java.lang.String |
PURITY
The PURITY. |
static java.lang.String |
PURITY_F05
The PURIT y_ f05. |
static int |
RAND_STATISTIC
The Constant RAND_STATISTIC. |
Constructor Summary | |
---|---|
Measures()
|
Method Summary | |
---|---|
static double |
BCubedExtendedPrecision(Clustering key,
Clustering answer)
Calculates a BCubed precision measure, extended for multicategory clustering problems. |
static double |
BCubedExtendedRecall(Clustering key,
Clustering answer)
B cubed extended recall. |
static double |
FMeasure(double P,
double R,
double alpha)
Calculates the F measure as follows: F-Measure = 1 / (alpha*1/purity + (1-alpha)*1/inv_purity) where alpha range is in the range of [0.0, 1.0] |
static double |
inversePurity(Clustering key,
Clustering answer)
Inverse purity. |
static double |
multiplicity(Clustering answer,
Clustering key)
Calculates the multiplicity measure. |
static double |
pairsMeasure(Clustering answer,
Clustering key,
int metricType)
Calculates a pairs based measure. |
static double |
purity(Clustering key,
Clustering answer)
Calculates the standard purity measure. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PURITY
public static final java.lang.String INVERSE_PURITY
public static final java.lang.String PURITY_F05
public static final java.lang.String BCUBED_EXT_RECALL
public static final java.lang.String BCUBED_EXT_PRECISION
public static final java.lang.String BCUBED_F05
public static final java.lang.String MULTIPLICITY
public static final java.lang.String PAIRS_RAND_STATISTIC
public static final java.lang.String PAIRS_JACCARD_COEFFICIENT
public static final java.lang.String PAIRS_FOLKES_AND_MALLOWS
public static final int RAND_STATISTIC
public static final int JACCARD_COEFFICIENT
public static final int FOLKES_AND_MALLOWS
Constructor Detail |
---|
public Measures()
Method Detail |
---|
public static double FMeasure(double P, double R, double alpha)
F-Measure = 1 / (alpha*1/purity + (1-alpha)*1/inv_purity)where alpha range is in the range of [0.0, 1.0]
R
- the recall measureP
- the precision measurealpha
- the alpha
public static double multiplicity(Clustering answer, Clustering key)
key
- the key clusteringanswer
- the answer clustering
public static double pairsMeasure(Clustering answer, Clustering key, int metricType)
key
- the key clusteringmetricType
- the type of pair based metric (RAND_STATISTIC, JACCARD_COEFFICIENT or FOLKES_AND_MALLOWS).answer
- the answer clustering
public static double purity(Clustering key, Clustering answer)
key
- the key clusteringanswer
- the answer clustering
public static double inversePurity(Clustering key, Clustering answer)
key
- the keyanswer
- the answer
public static double BCubedExtendedPrecision(Clustering key, Clustering answer)
For each element in clustering e { precision_samples = 0 precision = 0 recall_samples = 0 recall = 0 For each element in clustering e' { boolean b_1 = e & e' share a cluster boolean b_2 = e & e' share a category IF b_1 { precision_samples ++ IF b_2 { precision ++ } } IF b_2 { recall_samples ++ IF b_1 { recall ++ } } } precision_total += precision/precision_samples recall_total += recall/recall_samples samples_total ++; } precision_total /= samples_total recall_total /= samples_totalReference: E. Amigó, J. Gonzalo and J. Artiles. Evaluation metrics for clustering tasks: a comparison based on formal constraints. Technical report to be published in http://nlp.uned.es
key
- the key clusteringanswer
- the answer clustering
public static double BCubedExtendedRecall(Clustering key, Clustering answer)
key
- the keyanswer
- the answer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |