Package elki.datasource.filter.transform
Class AbstractSupervisedProjectionVectorFilter<V extends NumberVector>
- java.lang.Object
-
- elki.datasource.filter.transform.AbstractSupervisedProjectionVectorFilter<V>
-
- Type Parameters:
V- Vector type
- All Implemented Interfaces:
ObjectFilter
- Direct Known Subclasses:
LinearDiscriminantAnalysisFilter
public abstract class AbstractSupervisedProjectionVectorFilter<V extends NumberVector> extends java.lang.Object implements ObjectFilter
Base class for supervised projection methods. TODO: re-add sampling.- Since:
- 0.6.0
- Author:
- Angela Peng, Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected inttdimThe dimensionality to which the data should be reduced.
-
Constructor Summary
Constructors Constructor Description AbstractSupervisedProjectionVectorFilter(int projdimension)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract double[][]computeProjectionMatrix(java.util.List<V> vectorcolumn, java.util.List<? extends ClassLabel> classcolumn, int dim)computes the projection matrixprotected SimpleTypeInformation<?>convertedType(SimpleTypeInformation<?> in, NumberVector.Factory<V> factory)Get the output type from the input type after conversion.MultipleObjectsBundlefilter(MultipleObjectsBundle objects)Filter a set of object packages.protected abstract LogginggetLogger()Class logger.protected <O> java.util.Map<O,it.unimi.dsi.fastutil.ints.IntList>partition(java.util.List<? extends O> classcolumn)Partition the bundle based on the class label.
-
-
-
Method Detail
-
filter
public MultipleObjectsBundle filter(MultipleObjectsBundle objects)
Description copied from interface:ObjectFilterFilter a set of object packages.- Specified by:
filterin interfaceObjectFilter- Parameters:
objects- Object to filter- Returns:
- Filtered objects
-
convertedType
protected SimpleTypeInformation<?> convertedType(SimpleTypeInformation<?> in, NumberVector.Factory<V> factory)
Get the output type from the input type after conversion.- Parameters:
in- input type restrictionfactory- Vector factory- Returns:
- output type restriction
-
getLogger
protected abstract Logging getLogger()
Class logger.- Returns:
- Logger
-
computeProjectionMatrix
protected abstract double[][] computeProjectionMatrix(java.util.List<V> vectorcolumn, java.util.List<? extends ClassLabel> classcolumn, int dim)
computes the projection matrix- Parameters:
vectorcolumn- Vectorsclasscolumn- Class informationdim- Dimensionality Dimensionality- Returns:
- Projection matrix
-
partition
protected <O> java.util.Map<O,it.unimi.dsi.fastutil.ints.IntList> partition(java.util.List<? extends O> classcolumn)
Partition the bundle based on the class label.- Parameters:
classcolumn-- Returns:
- Partitioned data set.
-
-