|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,R>
de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm<V,D,CollectionResult<DoubleVector>>
de.lmu.ifi.dbs.elki.algorithm.statistics.DistanceStatisticsWithClasses<V,D>
V
- Vector typepublic class DistanceStatisticsWithClasses<V extends RealVector<V,?>,D extends NumberDistance<D,?>>
Algorithm to gather statistics over the distance distribution in the data set.
Field Summary | |
---|---|
static OptionID |
HISTOGRAM_BINS_ID
OptionID for HISTOGRAM_BINS_OPTION |
private IntParameter |
HISTOGRAM_BINS_OPTION
Option to configure the number of bins to use. |
private int |
numbin
Number of bins to use in sampling. |
private CollectionResult<DoubleVector> |
result
|
private boolean |
sampling
Sampling |
private Flag |
SAMPLING_FLAG
Flag to enable sampling Key: -h
|
static OptionID |
SAMPLING_ID
OptionID for SAMPLING_FLAG |
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm |
---|
DISTANCE_FUNCTION_ID, DISTANCE_FUNCTION_PARAM |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
optionHandler |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
DistanceStatisticsWithClasses()
Empty constructor. |
Method Summary | |
---|---|
private DoubleMinMax |
exactMinMax(Database<V> database,
DistanceFunction<V,D> distFunc)
|
Description |
getDescription()
Describe the algorithm and it's use. |
CollectionResult<DoubleVector> |
getResult()
Return a result object |
protected CollectionResult<DoubleVector> |
runInTime(Database<V> database)
Iterates over all points in the database. |
private DoubleMinMax |
sampleMinMax(Database<V> database,
DistanceFunction<V,D> distFunc)
|
List<String> |
setParameters(List<String> args)
Calls the super method and instantiates DistanceBasedAlgorithm.distanceFunction according to the value of parameter
DistanceBasedAlgorithm.DISTANCE_FUNCTION_PARAM . |
private void |
shrinkHeap(TreeSet<FCPair<Double,Integer>> hotset,
int k)
|
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm |
---|
getDistanceFunction |
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm |
---|
isTime, isVerbose, run, setTime, setVerbose |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
Field Detail |
---|
private CollectionResult<DoubleVector> result
public static final OptionID SAMPLING_ID
SAMPLING_FLAG
private final Flag SAMPLING_FLAG
Key: -h
public static final OptionID HISTOGRAM_BINS_ID
HISTOGRAM_BINS_OPTION
private final IntParameter HISTOGRAM_BINS_OPTION
private int numbin
private boolean sampling
Constructor Detail |
---|
public DistanceStatisticsWithClasses()
Method Detail |
---|
protected CollectionResult<DoubleVector> runInTime(Database<V> database) throws IllegalStateException
runInTime
in class AbstractAlgorithm<V extends RealVector<V,?>,CollectionResult<DoubleVector>>
database
- the database to run the algorithm on
IllegalStateException
- if the algorithm has not been initialized
properly (e.g. the setParameters(String[]) method has been failed
to be called).private DoubleMinMax sampleMinMax(Database<V> database, DistanceFunction<V,D> distFunc)
private DoubleMinMax exactMinMax(Database<V> database, DistanceFunction<V,D> distFunc)
private void shrinkHeap(TreeSet<FCPair<Double,Integer>> hotset, int k)
public Description getDescription()
public CollectionResult<DoubleVector> getResult()
public List<String> setParameters(List<String> args) throws ParameterException
DistanceBasedAlgorithm
DistanceBasedAlgorithm.distanceFunction
according to the value of parameter
DistanceBasedAlgorithm.DISTANCE_FUNCTION_PARAM
.
The remaining parameters are passed to the DistanceBasedAlgorithm.distanceFunction
.
setParameters
in interface Parameterizable
setParameters
in class DistanceBasedAlgorithm<V extends RealVector<V,?>,D extends NumberDistance<D,?>,CollectionResult<DoubleVector>>
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-setting
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |