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
Constructor and Description |
---|
ChainedTransformer(L left,
R right) |
Modifier and Type | Method and Description |
---|---|
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 . |
L |
left() |
R |
right() |
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 L left()
public R right()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.