Class: GBTRegressionModel

eclairjs/ml/regression.GBTRegressionModel

Gradient-Boosted Trees (GBTs) model for regression. It supports both continuous and categorical features.

Constructor

new GBTRegressionModel(trees, treeWeights)

Parameters:
Name Type Description
trees Array.<DecisionTreeRegressionModel> Decision trees in the ensemble.
treeWeights Array.<float> Weights for the decision trees in the ensemble.
Source:

Extends

Methods

(static) load(path) → {GBTRegressionModel}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
GBTRegressionModel

(static) read() → {MLReader}

Source:
Returns:
Type
MLReader

copy(extra) → {module:eclairjs/ml/regression.GBTRegressionModel}

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

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

Param for features column name.
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

getFeaturesCol() → {string}

Inherited From:
Source:
Returns:
Type
string

getLabelCol() → {Promise.<string>}

Inherited From:
Source:
Returns:
Type
Promise.<string>

getPredictionCol() → {Promise.<string>}

Inherited From:
Source:
Returns:
Type
Promise.<string>

hasParent() → {Promise.<boolean>}

Indicates whether this Model has a corresponding parent.
Inherited From:
Source:
Returns:
Type
Promise.<boolean>

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

Param for label column name.
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

numFeatures() → {Promise.<number>}

Returns the number of features the model was trained on. If unknown, returns -1
Inherited From:
Source:
Returns:
Type
Promise.<number>

parent() → {module:eclairjs/ml.Estimator}

Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.Estimator

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

Param for prediction column name.
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

setFeaturesCol(value) → {object}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
object

setParent(parent) → {object}

Sets the parent of this model.
Parameters:
Name Type Description
parent module:eclairjs/ml.Estimator
Inherited From:
Source:
Returns:
Type
object

setPredictionCol(value) → {object}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
object

toString() → {Promise.<string>}

Source:
Returns:
Type
Promise.<string>

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

Transforms dataset by reading from featuresCol, calling [[predict()]], and storing the predictions as a new column predictionCol.
Parameters:
Name Type Description
dataset module:eclairjs/sql.Dataset input dataset
Inherited From:
Source:
Returns:
transformed dataset with [[predictionCol]] of type [[Double]]
Type
module:eclairjs/sql.Dataset

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

trees() → {Array.<DecisionTreeRegressionModel>}

Source:
Returns:
Type
Array.<DecisionTreeRegressionModel>

treeWeights() → {Promise.<Array.<number>>}

Source:
Returns:
Type
Promise.<Array.<number>>

uid() → {Promise.<string>}

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

validateAndTransformSchema(schema, fitting, featuresDataType) → {module:eclairjs/sql/types.StructType}

Validates and transforms the input schema with the provided param map.
Parameters:
Name Type Description
schema module:eclairjs/sql/types.StructType
fitting boolean whether this is in fitting
featuresDataType module:eclairjs/sql/types.DataType SQL DataType for FeaturesType. E.g., module:eclairjs/sql/types.VectorUDTfor vector features
Inherited From:
Source:
Returns:
Type
module:eclairjs/sql/types.StructType

write() → {MLWriter}

Source:
Returns:
Type
MLWriter