Class: DecisionTreeRegressionModel

eclairjs/ml/regression.DecisionTreeRegressionModel

[[http://en.wikipedia.org/wiki/Decision_tree_learning Decision tree]] model for regression. It supports both continuous and categorical features.

Constructor

new DecisionTreeRegressionModel(rootNode)

Parameters:
Name Type Description
rootNode Root of the decision tree
Source:

Extends

Methods

(static) load(path) → {DecisionTreeRegressionModel}

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

(static) read() → {MLReader}

Source:
Returns:
Type
MLReader

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

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

depth() → {Promise.<number>}

Get depth of tree. E.g.: Depth 0 means 1 leaf node. Depth 1 means 1 internal node and 2 leaf nodes.
Inherited From:
Source:
Returns:
Type
Promise.<number>

numNodes() → {Promise.<number>}

Get number of nodes in tree, including leaf nodes.
Inherited From:
Source:
Returns:
Type
Promise.<number>

predict0(features) → {Promise.<number>}

Predict values for a single data point using the model trained.
Parameters:
Name Type Description
features module:eclairjs/mllib/linalg.Vector array representing a single data point
Inherited From:
Source:
Returns:
Double prediction from the trained model
Type
Promise.<number>

predict1(features) → {module:eclairjs/rdd.RDD}

Predict values for the given data set using the model trained.
Parameters:
Name Type Description
features module:eclairjs/rdd.RDD RDD representing data points to be predicted
Inherited From:
Source:
Returns:
RDD of predictions for each of the given data points
Type
module:eclairjs/rdd.RDD

predict2(features) → {JavaRDD}

Predict values for the given data set using the model trained.
Parameters:
Name Type Description
features JavaRDD JavaRDD representing data points to be predicted
Inherited From:
Source:
Returns:
JavaRDD of predictions for each of the given data points
Type
JavaRDD

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.
Inherited From:
Source:
Returns:
A Promise that resolves to nothing.
Type
Promise.<Void>

setVarianceCol(value) → {type}

Parameters:
Name Type Description
value string
Source:
Returns:
Type
type

toDebugString() → {Promise.<string>}

Print the full model to a string.
Inherited From:
Source:
Returns:
Type
Promise.<string>

toString() → {Promise.<string>}

Print a summary of the model.
Inherited From:
Source:
Returns:
Type
Promise.<string>

transform(dataset) → {DataFrame}

Parameters:
Name Type Description
dataset module:eclairjs/sql.Dataset
Source:
Returns:
Type
DataFrame

write() → {MLWriter}

Source:
Returns:
Type
MLWriter