V
- Vector typeD
- Distance type@Title(value="Evaluate Ranking Quality") @Description(value="Evaluates the effectiveness of a distance function via the obtained rankings.") public class EvaluateRankingQuality<V extends NumberVector<?>,D extends NumberDistance<D,?>> extends AbstractDistanceBasedAlgorithm<V,D,CollectionResult<DoubleVector>>
RankingQualityHistogram
, this method uses a binning
based on the centrality of objects. This allows analyzing whether or not a
particular distance degrades for the outer parts of a cluster.
TODO: Allow fixed binning range, configurable
TODO: Add samplingModifier and Type | Class and Description |
---|---|
static class |
EvaluateRankingQuality.Parameterizer<V extends NumberVector<?>,D extends NumberDistance<D,?>>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static OptionID |
HISTOGRAM_BINS_ID
Option to configure the number of bins to use.
|
private static Logging |
LOG
The logger for this class.
|
(package private) int |
numbins
Number of bins to use.
|
DISTANCE_FUNCTION_ID
Constructor and Description |
---|
EvaluateRankingQuality(DistanceFunction<? super V,D> distanceFunction,
int numbins)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
TypeInformation[] |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
HistogramResult<DoubleVector> |
run(Database database)
Runs the algorithm.
|
getDistanceFunction
makeParameterDistanceFunction
private static final Logging LOG
public static final OptionID HISTOGRAM_BINS_ID
int numbins
public EvaluateRankingQuality(DistanceFunction<? super V,D> distanceFunction, int numbins)
distanceFunction
- Distance functionnumbins
- Number of binspublic HistogramResult<DoubleVector> run(Database database)
Algorithm
run
in interface Algorithm
run
in class AbstractAlgorithm<CollectionResult<DoubleVector>>
database
- the database to run the algorithm onpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<CollectionResult<DoubleVector>>
protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<CollectionResult<DoubleVector>>