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<V,?>,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<V,?>,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 |
logger
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)
Run the algorithm.
|
getDistanceFunction
makeParameterDistanceFunction
private static final Logging logger
public static final OptionID HISTOGRAM_BINS_ID
int numbins
public EvaluateRankingQuality(DistanceFunction<? super V,D> distanceFunction, int numbins)
distanceFunction
- numbins
- public HistogramResult<DoubleVector> run(Database database) throws IllegalStateException
run
in interface Algorithm
run
in class AbstractAlgorithm<CollectionResult<DoubleVector>>
database
- the database to run the algorithm onIllegalStateException
- if the algorithm has not been initialized
properly (e.g. the setParameters(String[]) method has been failed
to be called).public TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<CollectionResult<DoubleVector>>
protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<CollectionResult<DoubleVector>>