public class ChainedTransformer<L extends Transformer<L>,R extends Transformer<R>> extends Object implements Transformer<ChainedTransformer<L,R>>, scala.Product, scala.Serializable
Transformer
which represents the chaining of two Transformer
.
A ChainedTransformer
can be treated as regular Transformer
. Upon calling the fit or
transform operation, the data is piped through all Transformer
of the pipeline.
The pipeline mechanism has been inspired by scikit-learn
param: left Left Transformer
of the pipeline
param: right Right Transformer
of the pipeline
Constructor and Description |
---|
ChainedTransformer(L left,
R right) |
Modifier and Type | Method and Description |
---|---|
abstract static boolean |
canEqual(Object that) |
static <L extends Transformer<L>,R extends Transformer<R>,I,T> |
chainedFitOperation(FitOperation<L,I> leftFitOperation,
TransformDataSetOperation<L,I,T> leftTransformOperation,
FitOperation<R,T> rightFitOperation)
FitOperation implementation for ChainedTransformer . |
static <L extends Transformer<L>,R extends Transformer<R>,I,T,O> |
chainedTransformOperation(TransformDataSetOperation<L,I,T> transformOpLeft,
TransformDataSetOperation<R,T,O> transformOpRight)
TransformDataSetOperation implementation for ChainedTransformer . |
static <P extends Predictor<P>> |
chainPredictor(P predictor) |
static <T extends Transformer<T>> |
chainTransformer(T transformer) |
abstract static boolean |
equals(Object that) |
static <Training> void |
fit(DataSet<Training> training,
ParameterMap fitParameters,
FitOperation<Self,Training> fitOperation) |
static <Training> ParameterMap |
fit$default$2() |
L |
left() |
static ParameterMap |
parameters() |
abstract static int |
productArity() |
abstract static Object |
productElement(int n) |
static scala.collection.Iterator<Object> |
productIterator() |
static String |
productPrefix() |
R |
right() |
static <Input,Output> |
transform(DataSet<Input> input,
ParameterMap transformParameters,
TransformDataSetOperation<Self,Input,Output> transformOperation) |
static <Input,Output> |
transform$default$2() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
chainPredictor, chainTransformer, transform
parameters
public static <L extends Transformer<L>,R extends Transformer<R>,I,T,O> TransformDataSetOperation<ChainedTransformer<L,R>,I,O> chainedTransformOperation(TransformDataSetOperation<L,I,T> transformOpLeft, TransformDataSetOperation<R,T,O> transformOpRight)
TransformDataSetOperation
implementation for ChainedTransformer
.
First the transform operation of the left Transformer
is called with the input data. This
generates intermediate data which is fed to the right Transformer
's transform operation.
transformOpLeft
- TransformDataSetOperation
for the left Transformer
transformOpRight
- TransformDataSetOperation
for the right Transformer
public static <L extends Transformer<L>,R extends Transformer<R>,I,T> FitOperation<ChainedTransformer<L,R>,I> chainedFitOperation(FitOperation<L,I> leftFitOperation, TransformDataSetOperation<L,I,T> leftTransformOperation, FitOperation<R,T> rightFitOperation)
FitOperation
implementation for ChainedTransformer
.
First the fit operation of the left Transformer
is called with the input data. Then
the data is transformed by this Transformer
and the given to the fit operation of the
right Transformer
.
leftFitOperation
- FitOperation
for the left Transformer
leftTransformOperation
- TransformDataSetOperation
for the left Transformer
rightFitOperation
- FitOperation
for the right Transformer
public static ParameterMap parameters()
public static <Training> void fit(DataSet<Training> training, ParameterMap fitParameters, FitOperation<Self,Training> fitOperation)
public static <Training> ParameterMap fit$default$2()
public static <Input,Output> DataSet<Output> transform(DataSet<Input> input, ParameterMap transformParameters, TransformDataSetOperation<Self,Input,Output> transformOperation)
public static <T extends Transformer<T>> ChainedTransformer<Self,T> chainTransformer(T transformer)
public static <P extends Predictor<P>> ChainedPredictor<Self,P> chainPredictor(P predictor)
public static <Input,Output> ParameterMap transform$default$2()
public abstract static boolean canEqual(Object that)
public abstract static boolean equals(Object that)
public abstract static Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<Object> productIterator()
public static String productPrefix()
public L left()
public R right()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.