Class: PolynomialExpansion

eclairjs/ml/feature.PolynomialExpansion

Perform feature expansion in a polynomial space. As said in wikipedia of Polynomial Expansion, which is available at http://en.wikipedia.org/wiki/Polynomial_expansion, "In mathematics, an expansion of a product of sums expresses it as a sum of products by using the fact that multiplication distributes over addition". Take a 2-variable feature vector as an example: `(x, y)`, if we want to expand it with degree 2, then we get `(x, x * x, y, x * y, y * y)`.

Constructor

new PolynomialExpansion(uidopt)

Parameters:
Name Type Attributes Description
uid string <optional>
Source:

Extends

Methods

(static) load(path) → {module:eclairjs/ml/feature.PolynomialExpansion}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
module:eclairjs/ml/feature.PolynomialExpansion

copy(extra) → {module:eclairjs/ml/feature.PolynomialExpansion}

Parameters:
Name Type Description
extra module:eclairjs/ml/param.ParamMap
Overrides:
Source:
Returns:
Type
module:eclairjs/ml/feature.PolynomialExpansion

degree() → {module:eclairjs/ml/param.IntParam}

The polynomial degree to expand, which should be >= 1. A value of 1 means no expansion. Default: 2
Source:
Returns:
Type
module:eclairjs/ml/param.IntParam

getDegree() → {Promise.<number>}

Source:
Returns:
Type
Promise.<number>

setDegree(value) → {module:eclairjs/ml/feature.PolynomialExpansion}

Parameters:
Name Type Description
value integer
Source:
Returns:
Type
module:eclairjs/ml/feature.PolynomialExpansion

setInputCol(value) → {module:eclairjs/ml.UnaryTransformer}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.UnaryTransformer

setOutputCol(value) → {module:eclairjs/ml.UnaryTransformer}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.UnaryTransformer

transform(dataset) → {module:eclairjs/sql.DataFrame}

Parameters:
Name Type Description
dataset module:eclairjs/sql.DataFrame
Inherited From:
Source:
Returns:
Type
module:eclairjs/sql.DataFrame

transformSchema(schema) → {module:eclairjs/sql/types.StructType}

Parameters:
Name Type Description
schema module:eclairjs/sql/types.StructType
Inherited From:
Source:
Returns:
Type
module:eclairjs/sql/types.StructType

uid() → {Promise.<string>}

An immutable unique ID for the object and its derivatives.
Source:
Returns:
Type
Promise.<string>