public class PairCountingFMeasure extends Object
Constructor and Description |
---|
PairCountingFMeasure() |
Modifier and Type | Method and Description |
---|---|
static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> |
compareClusterings(R result1,
S result2)
Compare two clustering results.
|
static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> |
compareClusterings(R result1,
S result2,
boolean noiseSpecial,
boolean hierarchicalSpecial)
Compare two clustering results.
|
static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> |
compareClusterings(R result1,
S result2,
double beta)
Compare two clustering results.
|
static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> |
compareClusterings(R result1,
S result2,
double beta,
boolean noiseSpecial,
boolean hierarchicalSpecial)
Compare two clustering results.
|
static Triple<Integer,Integer,Integer> |
countPairs(PairSortedGeneratorInterface first,
PairSortedGeneratorInterface second)
Compare two sets of generated pairs.
|
static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> |
countPairs(R result1,
S result2)
Compare two sets of generated pairs.
|
static double |
fMeasure(int inBoth,
int inFirst,
int inSecond,
double beta)
Computes the F-measure of the given parameters.
|
static <R extends Clustering<M>,M extends Model> |
getPairGenerator(R clusters,
boolean noiseSpecial,
boolean hierarchicalSpecial)
Get a pair generator for the given Clustering
|
public static <R extends Clustering<M>,M extends Model> PairSortedGeneratorInterface getPairGenerator(R clusters, boolean noiseSpecial, boolean hierarchicalSpecial)
R
- Clustering result classM
- Model typeclusters
- Clustering resultnoiseSpecial
- Special handling for "noise clusters"hierarchicalSpecial
- Special handling for hierarchical clusterspublic static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> double compareClusterings(R result1, S result2, double beta, boolean noiseSpecial, boolean hierarchicalSpecial)
R
- Result typeM
- Model typeS
- Result typeN
- Model typeresult1
- first resultresult2
- second resultbeta
- Beta value for the F-MeasurenoiseSpecial
- Noise receives special treatmenthierarchicalSpecial
- Special handling for hierarchical clusterspublic static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> double compareClusterings(R result1, S result2, double beta)
R
- Result typeM
- Model typeS
- Result typeN
- Model typeresult1
- first resultresult2
- second resultbeta
- Beta value for the F-Measurepublic static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> double compareClusterings(R result1, S result2, boolean noiseSpecial, boolean hierarchicalSpecial)
R
- Result typeM
- Model typeS
- Result typeN
- Model typeresult1
- first resultresult2
- second resultnoiseSpecial
- Noise receives special treatmentpublic static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> double compareClusterings(R result1, S result2)
R
- Result typeM
- Model typeS
- Result typeN
- Model typeresult1
- first resultresult2
- second resultpublic static <R extends Clustering<M>,M extends Model,S extends Clustering<N>,N extends Model> Triple<Integer,Integer,Integer> countPairs(R result1, S result2)
R
- Result typeM
- Model typeS
- Result typeN
- Model typeresult1
- first resultresult2
- second resultTriple
that contains the number of objects that
are in both sets (FIRST), the number of objects that are just in
the first set (SECOND) and the number of object that are just in
the second set (THIRD).public static Triple<Integer,Integer,Integer> countPairs(PairSortedGeneratorInterface first, PairSortedGeneratorInterface second)
first
- first setsecond
- second setTriple
that contains the number of objects that
are in both sets (FIRST), the number of objects that are just in
the first set (SECOND) and the number of object that are just in
the second set (THIRD).public static double fMeasure(int inBoth, int inFirst, int inSecond, double beta)
Returns
((1+beta*beta) * inBoth) / ((1+beta*beta) * inBoth + (beta*beta)*inFirst + inSecond)
inBoth
- The number of objects that are in both sets.inFirst
- The number of objects that are in the first set.inSecond
- The number of objects that are in the second set.beta
- The beta values for the f-measure.