|
|
|||||||||||||||||||||
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,CorrelationAnalysisSolution<V>>
de.lmu.ifi.dbs.elki.algorithm.DependencyDerivator<V,D>
V
- the type of RealVector handled by this AlgorithmD
- the type of Distance used by this Algorithmpublic class DependencyDerivator<V extends RealVector<V,?>,D extends Distance<D>>
Dependency derivator computes quantitatively linear dependencies among attributes of a given dataset based on a linear correlation PCA.
Reference:
Field Summary | |
---|---|
static OptionID |
DEPENDENCY_DERIVATOR_RANDOM_SAMPLE
OptionID for RANDOM_SAMPLE_FLAG |
NumberFormat |
NF
Number format for output of solution. |
static OptionID |
OUTPUT_ACCURACY_ID
OptionID for OUTPUT_ACCURACY_PARAM |
private IntParameter |
OUTPUT_ACCURACY_PARAM
Parameter to specify the threshold for output accuracy fraction digits, must be an integer equal to or greater than 0. |
private PCAFilteredRunner<V,DoubleDistance> |
pca
Holds the object performing the pca. |
private Flag |
RANDOM_SAMPLE_FLAG
Flag to use random sample (use knn query around centroid, if flag is not set). |
static OptionID |
SAMPLE_SIZE_ID
OptionID for SAMPLE_SIZE_PARAM |
private IntParameter |
SAMPLE_SIZE_PARAM
Optional parameter to specify the treshold for the size of the random sample to use, must be an integer greater than 0. |
private Integer |
sampleSize
Holds the value of SAMPLE_SIZE_PARAM . |
private CorrelationAnalysisSolution<V> |
solution
Holds the solution. |
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 | |
---|---|
DependencyDerivator()
Provides a dependency derivator, adding parameters OUTPUT_ACCURACY_PARAM ,
SAMPLE_SIZE_PARAM
, and flag
RANDOM_SAMPLE_FLAG
to the option handler additionally to parameters of super class. |
Method Summary | |
---|---|
CorrelationAnalysisSolution<V> |
generateModel(Database<V> db,
Collection<Integer> ids)
Runs the pca on the given set of IDs. |
CorrelationAnalysisSolution<V> |
generateModel(Database<V> db,
Collection<Integer> ids,
V centroidDV)
Runs the pca on the given set of IDs and for the given centroid. |
Description |
getDescription()
Returns a description of the algorithm. |
CorrelationAnalysisSolution<V> |
getResult()
Returns the result of the algorithm. |
CorrelationAnalysisSolution<V> |
runInTime(Database<V> db)
Computes quantitatively linear dependencies among the attributes of the given database based on a linear correlation PCA. |
List<String> |
setParameters(List<String> args)
Calls the super method and sets additionally the values of the parameters OUTPUT_ACCURACY_PARAM and SAMPLE_SIZE_PARAM . |
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 |
---|
public static final OptionID DEPENDENCY_DERIVATOR_RANDOM_SAMPLE
RANDOM_SAMPLE_FLAG
public static final OptionID OUTPUT_ACCURACY_ID
OUTPUT_ACCURACY_PARAM
private final IntParameter OUTPUT_ACCURACY_PARAM
Parameter to specify the threshold for output accuracy fraction digits, must be an integer equal to or greater than 0.
Default value: 4
Key: -derivator.accuracy
public static final OptionID SAMPLE_SIZE_ID
SAMPLE_SIZE_PARAM
private final IntParameter SAMPLE_SIZE_PARAM
-derivator.sampleSize
private Integer sampleSize
SAMPLE_SIZE_PARAM
.
private final Flag RANDOM_SAMPLE_FLAG
-derivator.randomSample
private PCAFilteredRunner<V extends RealVector<V,?>,DoubleDistance> pca
private CorrelationAnalysisSolution<V extends RealVector<V,?>> solution
public final NumberFormat NF
Constructor Detail |
---|
public DependencyDerivator()
OUTPUT_ACCURACY_PARAM
,
SAMPLE_SIZE_PARAM
, and flag
RANDOM_SAMPLE_FLAG
to the option handler additionally to parameters of super class.
Method Detail |
---|
public Description getDescription()
Algorithm
public CorrelationAnalysisSolution<V> runInTime(Database<V> db) throws IllegalStateException
runInTime
in class AbstractAlgorithm<V extends RealVector<V,?>,CorrelationAnalysisSolution<V extends RealVector<V,?>>>
db
- the database to run this DependencyDerivator on
IllegalStateException
- if the algorithm has not been initialized
properly (e.g. the setParameters(String[]) method has been failed
to be called).public CorrelationAnalysisSolution<V> generateModel(Database<V> db, Collection<Integer> ids)
db
- the databaseids
- the set of ids
public CorrelationAnalysisSolution<V> generateModel(Database<V> db, Collection<Integer> ids, V centroidDV)
db
- the databaseids
- the set of idscentroidDV
- the centroid
public CorrelationAnalysisSolution<V> getResult()
Algorithm
public List<String> setParameters(List<String> args) throws ParameterException
OUTPUT_ACCURACY_PARAM
and SAMPLE_SIZE_PARAM
. The
remaining parameters are passed to the pca
.
setParameters
in interface Parameterizable
setParameters
in class DistanceBasedAlgorithm<V extends RealVector<V,?>,D extends Distance<D>,CorrelationAnalysisSolution<V extends RealVector<V,?>>>
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 |