Package elki.algorithm
Class KNNDistancesSampler.Par<O>
- java.lang.Object
-
- elki.algorithm.KNNDistancesSampler.Par<O>
-
- All Implemented Interfaces:
Parameterizer
- Enclosing class:
- KNNDistancesSampler<O>
public static class KNNDistancesSampler.Par<O> extends java.lang.Object implements Parameterizer
Parameterization class.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected Distance<? super O>distanceThe distance function to use.protected intkParameter k.static OptionIDK_IDParameter to specify the distance of the k-distant object to be assessed, must be an integer greater than 0.protected doublepercentageSampling percentage.protected RandomFactoryrndRandom number seeding.static OptionIDSAMPLING_IDParameter to specify the average percentage of distances randomly chosen to be provided in the result, must be a double greater than 0 and less than or equal to 1.static OptionIDSEED_IDRandom generator seed for distances.
-
Constructor Summary
Constructors Constructor Description Par()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Parameterization config)Configure the class.KNNDistancesSampler<O>make()Make an instance after successful configuration.
-
-
-
Field Detail
-
K_ID
public static final OptionID K_ID
Parameter to specify the distance of the k-distant object to be assessed, must be an integer greater than 0.
-
SAMPLING_ID
public static final OptionID SAMPLING_ID
Parameter to specify the average percentage of distances randomly chosen to be provided in the result, must be a double greater than 0 and less than or equal to 1.
-
SEED_ID
public static final OptionID SEED_ID
Random generator seed for distances.
-
k
protected int k
Parameter k.
-
percentage
protected double percentage
Sampling percentage.
-
rnd
protected RandomFactory rnd
Random number seeding.
-
-
Method Detail
-
configure
public void configure(Parameterization config)
Description copied from interface:ParameterizerConfigure the class.Note: the status is collected by the parameterization object, so that multiple errors may arise and be reported in one run.
- Specified by:
configurein interfaceParameterizer- Parameters:
config- Parameterization
-
make
public KNNDistancesSampler<O> make()
Description copied from interface:ParameterizerMake an instance after successful configuration.Note: your class should return the exact type, only this very broad interface should use
Objectas return type.- Specified by:
makein interfaceParameterizer- Returns:
- a new instance
-
-