|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.datasource.filter.AbstractConversionFilter<O,O> de.lmu.ifi.dbs.elki.datasource.filter.AbstractNormalization<V> de.lmu.ifi.dbs.elki.datasource.filter.AttributeWiseVarianceNormalization<V>
V
- vector typepublic class AttributeWiseVarianceNormalization<V extends NumberVector<V,?>>
Class to perform and undo a normalization on real vectors with respect to given mean and standard deviation in each dimension.
Nested Class Summary | |
---|---|
static class |
AttributeWiseVarianceNormalization.Parameterizer<V extends NumberVector<V,?>>
Parameterization class. |
Field Summary | |
---|---|
static Logging |
logger
Class logger. |
private double[] |
mean
Stores the mean in each dimension. |
static OptionID |
MEAN_ID
Parameter for means. |
(package private) MeanVariance[] |
mvs
Temporary storage used during initialization. |
private double[] |
stddev
Stores the standard deviation in each dimension. |
static OptionID |
STDDEV_ID
Parameter for stddevs. |
Constructor Summary | |
---|---|
AttributeWiseVarianceNormalization(double[] mean,
double[] stddev)
Constructor. |
Method Summary | |
---|---|
protected V |
filterSingleObject(V featureVector)
Normalize a single instance. |
protected SimpleTypeInformation<? super V> |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query. |
private double |
normalize(int d,
double val)
|
protected void |
prepareComplete()
Complete the initialization phase |
protected void |
prepareProcessInstance(V featureVector)
Process a single object during initialization. |
protected boolean |
prepareStart(SimpleTypeInformation<V> in)
Return "true" when the normalization needs initialization (two-pass filtering!) |
private double |
restore(int d,
double val)
|
V |
restore(V featureVector)
Transforms a feature vector to the original attribute ranges. |
String |
toString()
|
LinearEquationSystem |
transform(LinearEquationSystem linearEquationSystem)
Transforms a linear equation system describing linear dependencies derived on the normalized space into a linear equation system describing linear dependencies quantitatively adapted to the original space. |
Methods inherited from class de.lmu.ifi.dbs.elki.datasource.filter.AbstractNormalization |
---|
convertedType, normalizeObjects |
Methods inherited from class de.lmu.ifi.dbs.elki.datasource.filter.AbstractConversionFilter |
---|
filter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.datasource.filter.ObjectFilter |
---|
filter |
Field Detail |
---|
public static final Logging logger
public static final OptionID MEAN_ID
public static final OptionID STDDEV_ID
private double[] mean
private double[] stddev
MeanVariance[] mvs
Constructor Detail |
---|
public AttributeWiseVarianceNormalization(double[] mean, double[] stddev)
mean
- Mean valuestddev
- Standard deviationMethod Detail |
---|
protected boolean prepareStart(SimpleTypeInformation<V> in)
AbstractConversionFilter
prepareStart
in class AbstractConversionFilter<V extends NumberVector<V,?>,V extends NumberVector<V,?>>
in
- Input type information
protected void prepareProcessInstance(V featureVector)
AbstractConversionFilter
prepareProcessInstance
in class AbstractConversionFilter<V extends NumberVector<V,?>,V extends NumberVector<V,?>>
featureVector
- Object to processprotected void prepareComplete()
AbstractConversionFilter
prepareComplete
in class AbstractConversionFilter<V extends NumberVector<V,?>,V extends NumberVector<V,?>>
protected V filterSingleObject(V featureVector)
AbstractConversionFilter
filterSingleObject
in class AbstractConversionFilter<V extends NumberVector<V,?>,V extends NumberVector<V,?>>
featureVector
- Database object to normalize
public V restore(V featureVector) throws NonNumericFeaturesException
Normalization
featureVector
- a feature vector to be transformed into original space
NonNumericFeaturesException
- feature vector is not compatible with values initialized
during normalizationprivate double normalize(int d, double val)
private double restore(int d, double val)
public LinearEquationSystem transform(LinearEquationSystem linearEquationSystem)
Normalization
transform
in interface Normalization<V extends NumberVector<V,?>>
transform
in class AbstractNormalization<V extends NumberVector<V,?>>
linearEquationSystem
- the linear equation system to be transformed
protected SimpleTypeInformation<? super V> getInputTypeRestriction()
AbstractConversionFilter
getInputTypeRestriction
in class AbstractConversionFilter<V extends NumberVector<V,?>,V extends NumberVector<V,?>>
public String toString()
toString
in class AbstractNormalization<V extends NumberVector<V,?>>
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |