Class Log1PlusNormalization<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.Log1PlusNormalization<V>
-
- Type Parameters:
V
- vector type
- All Implemented Interfaces:
BundleStreamSource
,Normalization<V>
,ObjectFilter
,StreamFilter
public class Log1PlusNormalization<V extends NumberVector> extends AbstractVectorStreamConversionFilter<V,V> implements Normalization<V>
Normalize the data set by applying \( \frac{\log(1+|x|b)}{\log 1+b} \) to any value. If the input data was in [0;1], then the resulting values will be in [0;1], too.By default b=1, and thus the transformation is \(\log_2(1+|x|)\).
- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Log1PlusNormalization.Par<V extends NumberVector>
Parameterization class.-
Nested classes/interfaces inherited from interface elki.datasource.bundle.BundleStreamSource
BundleStreamSource.Event
-
-
Field Summary
Fields Modifier and Type Field Description protected double
boost
Boosting factor, and scaling coefficient.protected double
scale
Boosting factor, and scaling coefficient.static Log1PlusNormalization<NumberVector>
STATIC
Static instance.-
Fields inherited from class elki.datasource.filter.AbstractVectorStreamConversionFilter
factory
-
Fields inherited from class elki.datasource.filter.AbstractStreamFilter
source
-
-
Constructor Summary
Constructors Constructor Description Log1PlusNormalization(double boost)
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 V
filterSingleObject(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 Log1PlusNormalization<NumberVector> STATIC
Static instance.
-
boost
protected double boost
Boosting factor, and scaling coefficient.
-
scale
protected double scale
Boosting factor, and scaling coefficient.
-
-
Method Detail
-
filterSingleObject
protected V filterSingleObject(V featureVector)
Description copied from class:AbstractStreamConversionFilter
Normalize a single instance. You can implement this as UnsupportedOperationException if you override both public "normalize" functions!- Specified by:
filterSingleObject
in 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:AbstractStreamConversionFilter
Get the output type from the input type after conversion.- Specified by:
convertedType
in 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:AbstractStreamConversionFilter
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in classAbstractStreamConversionFilter<V extends NumberVector,V extends NumberVector>
- Returns:
- Type restriction
-
-