new RandomForestModel(algo, trees) → (nullable) {?}
Parameters:
Name | Type | Description |
---|---|---|
algo |
Algo | |
trees |
Array.<module:eclairjs/mllib/tree/model.DecisionTreeModel> |
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. |
Returns:
Model instance
predict(features)
Predict values for a single data point using the model trained.
Parameters:
Name | Type | Description |
---|---|---|
features |
array representing a single data point |
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. |
toDebugString() → {string}
Print the full model to a string.
Returns:
- Type
- string