|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.classify.feature.FeatureTransformer
public abstract class FeatureTransformer
An feature transformer transforms a feature vector in a suitable way. Feature transformer can be used for feature selection (discarding irrelevant features), for combining features etc. Feature transforms can be chained -- in this case each feature transformer will work on the featured returned by the previous one.
Field Summary | |
---|---|
static String |
CONFIG_TRANSFORMERS
Configuration key specifying the list of transformers to chain. |
Constructor Summary | |
---|---|
FeatureTransformer(FeatureTransformer precTrans)
Creates a new instance. |
Method Summary | |
---|---|
static FeatureTransformer |
createTransformer()
Factory method that delegates to createTransformer() using the
standard configuration. |
static FeatureTransformer |
createTransformer(TiesConfiguration config)
Factory method that creates a feature transformer based on the CONFIG_TRANSFORMERS key in the provided configuration. |
protected abstract FeatureVector |
doTransform(FeatureVector orgFeatures)
Transforms a feature vector. |
FeatureTransformer |
getPrecedingTransformer()
Returns the preceding transformer used if this transformer is part of a chain. |
String |
toString()
Returns a string representation of this object. |
FeatureVector |
transform(FeatureVector orgFeatures)
Transforms a feature vector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CONFIG_TRANSFORMERS
Constructor Detail |
---|
public FeatureTransformer(FeatureTransformer precTrans)
precTrans
- the preceding transformer to use if this transformer
is part of a chain; null
otherwiseMethod Detail |
---|
public static FeatureTransformer createTransformer() throws IllegalArgumentException, ProcessingException
createTransformer()
using the
standard configuration.
null
is no transformers are specified (parameter value is
null
or empty)
IllegalArgumentException
- if the value of the
CONFIG_TRANSFORMERS
key is invalid
ProcessingException
- if an error occurred while creating the
transformerpublic static FeatureTransformer createTransformer(TiesConfiguration config) throws IllegalArgumentException, ProcessingException
CONFIG_TRANSFORMERS
key in the provided configuration.
This parameter must contain a list fully specified names of subclasses
of this class) used in a chain.
Eeach specified transformer must provide a constructor accepting a
preceding FeatureTransformer
as first argument and a
TiesConfiguration
as second argument.
config
- the configuration to use
null
is no transformers are specified (parameter value is
null
or empty)
IllegalArgumentException
- if the value of the
CONFIG_TRANSFORMERS
key is invalid
ProcessingException
- if an error occurred while creating the
transformerprotected abstract FeatureVector doTransform(FeatureVector orgFeatures)
orgFeatures
- the original feature vector to transform
public FeatureTransformer getPrecedingTransformer()
null
if this
transformer is not part of a chain resp. is the first transformer in a
chainpublic String toString()
toString
in class Object
public FeatureVector transform(FeatureVector orgFeatures)
doTransform(FeatureVector)
method.
orgFeatures
- the original feature vector to transform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |