Class: RandomForestModel

eclairjs/mllib/tree/model. RandomForestModel

new RandomForestModel(algo, trees) → (nullable) {?}

Parameters:
Name Type Description
algo Algo
trees Array.<module:eclairjs/mllib/tree/model.DecisionTreeModel>
Source:
Returns:
Type
?

Methods

(static) load(sc, path) → {module:eclairjs/mllib/tree/model.RandomForestModel}

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
module:eclairjs/mllib/tree/model.RandomForestModel

predict(features)

Predict values for a single data point using the model trained.
Parameters:
Name Type Description
features array representing a single data point
Source:
Returns:
predicted category from the trained model

save(sc, path)

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:

toDebugString() → {string}

Print the full model to a string.
Source:
Returns:
Type
string