O - Object typepublic class DistanceQuantileSampler<O> extends AbstractDistanceBasedAlgorithm<O,CollectionResult<double[]>>
| Modifier and Type | Class and Description |
|---|---|
static class |
DistanceQuantileSampler.Parameterizer<O>
Parameterization class
|
| Modifier and Type | Field and Description |
|---|---|
private static Logging |
LOG
Class logger.
|
private boolean |
nozeros
Flag to ignore zero distances (recommended with many duplicates).
|
private static java.lang.String |
PREFIX
Statistics prefix.
|
private double |
quantile
Quantile to compute.
|
private RandomFactory |
rand
Random generator.
|
private double |
sampling
Sampling rate.
|
ALGORITHM_IDDISTANCE_FUNCTION_ID| Constructor and Description |
|---|
DistanceQuantileSampler(DistanceFunction<? super O> distanceFunction,
double quantile,
double sampling,
boolean nozeros,
RandomFactory rand)
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.
|
CollectionResult<double[]> |
run(Database database,
Relation<O> rel)
Run the distance quantile sampler.
|
getDistanceFunctionrunprivate static final Logging LOG
private static final java.lang.String PREFIX
private double quantile
private double sampling
private boolean nozeros
private RandomFactory rand
public DistanceQuantileSampler(DistanceFunction<? super O> distanceFunction, double quantile, double sampling, boolean nozeros, RandomFactory rand)
distanceFunction - Distance functionquantile - Quantile to computesampling - Sampling ratenozeros - Flag to ignore zero distances (recommended with many
duplicates)rand - Random generatorpublic CollectionResult<double[]> run(Database database, Relation<O> rel)
database - rel - public TypeInformation[] getInputTypeRestriction()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<CollectionResult<double[]>>protected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<CollectionResult<double[]>>Copyright © 2019 ELKI Development Team. License information.