Class: RFormula

eclairjs/ml/feature. RFormula

Implements the transforms required for fitting a dataset against an R model formula. Currently we support a limited subset of the R operators, including '~', '.', ':', '+', and '-'. Also see the R formula docs here: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/formula.html

Constructor

new RFormula(uidopt)

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

Extends

Methods

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

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

extractParamMap() → {module:eclairjs/ml/param.ParamMap}

Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

fit(dataset) → {module:eclairjs/ml/feature.RFormulaModel}

Parameters:
Name Type Description
dataset module:eclairjs/sql.DataFrame
Overrides:
Source:
Returns:
Type
module:eclairjs/ml/feature.RFormulaModel

formula() → {module:eclairjs/ml/param.Param}

R formula parameter. The formula is provided in string form.
Source:
Returns:
Type
module:eclairjs/ml/param.Param

getFormula() → {string}

Source:
Returns:
Type
string

hasLabelCol(schema) → {boolean}

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

setFeaturesCol(value) → {module:eclairjs/ml/feature.RFormula}

Parameters:
Name Type Description
value string
Source:
Returns:
Type
module:eclairjs/ml/feature.RFormula

setFormula(value) → {module:eclairjs/ml/feature.RFormula}

Sets the formula to use for this transformer. Must be called before use.
Parameters:
Name Type Description
value string an R formula in string form (e.g. "y ~ x + z")
Source:
Returns:
Type
module:eclairjs/ml/feature.RFormula

setLabelCol(value) → {module:eclairjs/ml/feature.RFormula}

Parameters:
Name Type Description
value string
Source:
Returns:
Type
module:eclairjs/ml/feature.RFormula

toString() → {string}

Source:
Returns:
Type
string

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

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

uid() → {string}

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