public class PolynomialFeatures extends Object implements Transformer<PolynomialFeatures>
This transformer takes a a vector of values (x, y, z, ...)
and maps it into the
polynomial feature space of degree d
. That is to say, it calculates the following
representation:
(x, y, z, x^2, xy, y^2, yz, z^2, x^3, x^2y, x^2z, xyz, ...)^T
This transformer can be prepended to all Transformer
and
Predictor
implementations which expect an input of
LabeledVector
.
Modifier and Type | Class and Description |
---|---|
static class |
PolynomialFeatures.Degree$ |
Constructor and Description |
---|
PolynomialFeatures() |
Modifier and Type | Method and Description |
---|---|
static PolynomialFeatures |
apply() |
static <T> Object |
fitNoOp()
The
PolynomialFeatures transformer does not need a fitting phase. |
PolynomialFeatures |
setDegree(int degree) |
static Object |
transformLabeledVectorIntoPolynomialBase()
TransformDataSetOperation to map a LabeledVector into the
polynomial feature space |
static <T extends Vector> |
transformVectorIntoPolynomialBase(VectorBuilder<T> evidence$1,
TypeInformation<T> evidence$2,
scala.reflect.ClassTag<T> evidence$3)
TransformDataSetOperation to map a Vector into the
polynomial feature space. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
chainPredictor, chainTransformer, transform
parameters
public static PolynomialFeatures apply()
public static <T> Object fitNoOp()
PolynomialFeatures
transformer does not need a fitting phase.
public static <T extends Vector> Object transformVectorIntoPolynomialBase(VectorBuilder<T> evidence$1, TypeInformation<T> evidence$2, scala.reflect.ClassTag<T> evidence$3)
TransformDataSetOperation
to map a Vector
into the
polynomial feature space.
public static Object transformLabeledVectorIntoPolynomialBase()
TransformDataSetOperation
to map a LabeledVector
into the
polynomial feature spacepublic PolynomialFeatures setDegree(int degree)
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.