Polynomial Expansion
Applies polynomial expansion to vector columns.
This operation is ported from Spark ML.
For a comprehensive introduction, see
Spark documentation.
For scala docs details, see
org.apache.spark.ml.feature.PolynomialExpansion documentation.
Since: Seahorse 1.0.0
Port |
Type Qualifier |
Description |
0 | DataFrame | The input DataFrame . |
Output
Port |
Type Qualifier |
Description |
0 | DataFrame | The output DataFrame . |
1 | Transformer | A Transformer that allows to apply the operation on other DataFrames using a Transform. |
Parameters
Name |
Type |
Description |
degree |
Numeric |
The polynomial degree to expand. Value of 1 means no expansion. |
operate on |
InputOutputColumnSelector |
The input and output columns for the operation. |
Example
Parameters
Name |
Value |
degree |
2.0 |
operate on |
one column |
input column |
"input" |
output |
append new column |
output column |
"expanded" |
input |
[-2.0,2.3,0.0] |
[-2.0,2.3] |
[0.0,0.0,0.0] |
[0.6,-1.1,-3.0] |
[0.0,0.0,0.0] |
Output
input |
expanded |
[-2.0,2.3,0.0] |
[-2.0,4.0,2.3,-4.6,5.289999999999999,0.0,0.0,0.0,0.0] |
[-2.0,2.3] |
[-2.0,4.0,2.3,-4.6,5.289999999999999] |
[0.0,0.0,0.0] |
[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] |
[0.6,-1.1,-3.0] |
[0.6,0.36,-1.1,-0.66,1.2100000000000002,-3.0,-1.7999999999999998,3.3000000000000003,9.0] |
[0.0,0.0,0.0] |
[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] |