The polynomial features transformer maps a vector into the polynomial feature space of degree $d$. The dimension of the input vector determines the number of polynomial factors whose values are the respective vector entries. Given a vector $(x, y, z, \ldots)^T$ the resulting feature vector looks like:
Flink’s implementation orders the polynomials in decreasing order of their degree.
Given the vector $\left(3,2\right)^T$, the polynomial features vector of degree 3 would look like
This transformer can be prepended to all
Predictor implementations which expect an input of type
LabeledVector or any sub-type of
PolynomialFeatures is a
As such, it supports the
PolynomialFeatures is not trained on data and, thus, supports all types of input data.
PolynomialFeatures transforms all subtypes of
LabeledVector into their respective types:
transform[T <: Vector]: DataSet[T] => DataSet[T]
transform: DataSet[LabeledVector] => DataSet[LabeledVector]
The polynomial features transformer can be controlled by the following parameters:
The maximum polynomial degree. (Default value: 10)