Package elki.data.projection
Class RandomProjection<V extends NumberVector>
- java.lang.Object
-
- elki.data.projection.RandomProjection<V>
-
- Type Parameters:
V- Vector type
- All Implemented Interfaces:
Projection<V,V>
public class RandomProjection<V extends NumberVector> extends java.lang.Object implements Projection<V,V>
Randomized projections of the data.This class allows projecting the data with different types of random projections, in particular database friendly projections (as suggested by Achlioptas, see
AchlioptasRandomProjectionFamily), but also as suggested for locality sensitive hashing (LSH).- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRandomProjection.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description private intdimensionalityOutput dimensionality.private NumberVector.Factory<V>factoryVector factory.private RandomProjectionFamilyfamilyRandom projection familyprivate static LoggingLOGClass logger.private RandomProjectionFamily.ProjectionprojectionProjection matrix.
-
Constructor Summary
Constructors Constructor Description RandomProjection(int dimensionality, RandomProjectionFamily family)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformationgetInputDataTypeInformation()Input type information.SimpleTypeInformation<V>getOutputDataTypeInformation()Output type restrictionvoidinitialize(SimpleTypeInformation<? extends V> in)InitializeVproject(V data)Project a single instance.
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger.
-
factory
private NumberVector.Factory<V extends NumberVector> factory
Vector factory.
-
dimensionality
private int dimensionality
Output dimensionality.
-
projection
private RandomProjectionFamily.Projection projection
Projection matrix.
-
family
private RandomProjectionFamily family
Random projection family
-
-
Constructor Detail
-
RandomProjection
public RandomProjection(int dimensionality, RandomProjectionFamily family)Constructor.- Parameters:
dimensionality- Desired dimensionalityfamily- Random projection family
-
-
Method Detail
-
initialize
public void initialize(SimpleTypeInformation<? extends V> in)
Description copied from interface:ProjectionInitialize- Specified by:
initializein interfaceProjection<V extends NumberVector,V extends NumberVector>- Parameters:
in- Data type to use for projecting.
-
project
public V project(V data)
Description copied from interface:ProjectionProject a single instance.- Specified by:
projectin interfaceProjection<V extends NumberVector,V extends NumberVector>- Parameters:
data- Data to project- Returns:
- Projected data
-
getInputDataTypeInformation
public TypeInformation getInputDataTypeInformation()
Description copied from interface:ProjectionInput type information.- Specified by:
getInputDataTypeInformationin interfaceProjection<V extends NumberVector,V extends NumberVector>- Returns:
- Type restriction
-
getOutputDataTypeInformation
public SimpleTypeInformation<V> getOutputDataTypeInformation()
Description copied from interface:ProjectionOutput type restriction- Specified by:
getOutputDataTypeInformationin interfaceProjection<V extends NumberVector,V extends NumberVector>- Returns:
- Output type
-
-