Class: GradientBoostedTreesModel

eclairjs/mllib/tree/model.GradientBoostedTreesModel

new GradientBoostedTreesModel(algo, trees, treeWeights)

Represents a gradient boosted trees model.
Parameters:
Name Type Description
algo algorithm for the ensemble model, either Classification or Regression
trees tree ensembles
treeWeights tree ensemble weights
Source:

Methods

(static) load(sc, path) → {GradientBoostedTreesModel}

Parameters:
Name Type Description
sc module:eclairjs.SparkContext Spark context used for loading model files.
path string Path specifying the directory to which the model was saved.
Source:
Returns:
Model instance
Type
GradientBoostedTreesModel

evaluateEachIteration(data, loss) → {Promise.<Array.<number>>}

Method to compute error or loss for every iteration of gradient boosting.
Parameters:
Name Type Description
data module:eclairjs/rdd.RDD RDD of LabeledPoint
loss module:eclairjs/mllib/tree/loss.Loss evaluation metric. containing the first i+1 trees
Source:
Returns:
an array with index i having the losses or errors for the ensemble
Type
Promise.<Array.<number>>

save(sc, path) → {Promise.<Void>}

Parameters:
Name Type Description
sc module:eclairjs.SparkContext Spark context used to save model data.
path string Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.
Source:
Returns:
A Promise that resolves to nothing.
Type
Promise.<Void>