Class HellingerHistogramNormalization<V extends NumberVector>
- java.lang.Object
-
- elki.datasource.filter.AbstractStreamFilter
-
- elki.datasource.filter.AbstractStreamConversionFilter<I,O>
-
- elki.datasource.filter.AbstractVectorStreamConversionFilter<V,V>
-
- elki.datasource.filter.normalization.instancewise.HellingerHistogramNormalization<V>
-
- Type Parameters:
V- vector type
- All Implemented Interfaces:
BundleStreamSource,Normalization<V>,ObjectFilter,StreamFilter
public class HellingerHistogramNormalization<V extends NumberVector> extends AbstractVectorStreamConversionFilter<V,V> implements Normalization<V>
Normalize histograms by scaling them to unit absolute sum, then taking the square root of the absolute value in each attribute, times the normalization constant \(1/\sqrt{2}\).\[ H(x_i)=\tfrac{\sqrt{|x_i|/\Sigma}}{\sqrt{2}} \quad\text{ with } \Sigma=\sum\nolimits_i |x_i| \]
Using Euclidean distance (linear kernel) and this transformation is the same as using Hellinger distance:
HellingerDistance- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHellingerHistogramNormalization.ParParameterization class.-
Nested classes/interfaces inherited from interface elki.datasource.bundle.BundleStreamSource
BundleStreamSource.Event
-
-
Field Summary
Fields Modifier and Type Field Description static HellingerHistogramNormalization<NumberVector>STATICStatic instance.-
Fields inherited from class elki.datasource.filter.AbstractVectorStreamConversionFilter
factory
-
Fields inherited from class elki.datasource.filter.AbstractStreamFilter
source
-
-
Constructor Summary
Constructors Constructor Description HellingerHistogramNormalization()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SimpleTypeInformation<? super V>convertedType(SimpleTypeInformation<V> in)Get the output type from the input type after conversion.protected VfilterSingleObject(V featureVector)Normalize a single instance.protected SimpleTypeInformation<? super V>getInputTypeRestriction()Get the input type restriction used for negotiating the data query.-
Methods inherited from class elki.datasource.filter.AbstractVectorStreamConversionFilter
initializeOutputType
-
Methods inherited from class elki.datasource.filter.AbstractStreamConversionFilter
data, getMeta, nextEvent
-
Methods inherited from class elki.datasource.filter.AbstractStreamFilter
asMultipleObjectsBundle, assignDBID, filter, hasDBIDs, init, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface elki.datasource.filter.normalization.Normalization
restore, transform
-
Methods inherited from interface elki.datasource.filter.ObjectFilter
filter
-
-
-
-
Field Detail
-
STATIC
public static final HellingerHistogramNormalization<NumberVector> STATIC
Static instance.
-
-
Method Detail
-
filterSingleObject
protected V filterSingleObject(V featureVector)
Description copied from class:AbstractStreamConversionFilterNormalize a single instance. You can implement this as UnsupportedOperationException if you override both public "normalize" functions!- Specified by:
filterSingleObjectin classAbstractStreamConversionFilter<V extends NumberVector,V extends NumberVector>- Parameters:
featureVector- Database object to normalize- Returns:
- Normalized database object
-
convertedType
protected SimpleTypeInformation<? super V> convertedType(SimpleTypeInformation<V> in)
Description copied from class:AbstractStreamConversionFilterGet the output type from the input type after conversion.- Specified by:
convertedTypein classAbstractStreamConversionFilter<V extends NumberVector,V extends NumberVector>- Parameters:
in- input type restriction- Returns:
- output type restriction
-
getInputTypeRestriction
protected SimpleTypeInformation<? super V> getInputTypeRestriction()
Description copied from class:AbstractStreamConversionFilterGet the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestrictionin classAbstractStreamConversionFilter<V extends NumberVector,V extends NumberVector>- Returns:
- Type restriction
-
-