Constructor
new RandomForestClassificationModel()
- Source:
Extends
Methods
Parameters:
Name |
Type |
Description |
path |
string
|
|
- Source:
Returns:
-
Type
-
module:eclairjs/ml/classification.RandomForestClassificationModel
- Source:
Returns:
-
Type
-
module:eclairjs/ml/util.MLReader
Parameters:
- Overrides:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/classification.RandomForestClassificationModel
Estimate of the importance of each feature.
This generalizes the idea of "Gini" importance to other losses, following the explanation of Gini importance
from "Random Forests" documentation by Leo Breiman and Adele Cutler, and following the implementation from scikit-learn.
This feature importance is calculated as follows: - Average over trees: - importance(feature j) = sum
(over nodes which split on feature j) of the gain, where gain is scaled by the number of instances passing
through node - Normalize importances for tree based on total number of training instances used to build tree. -
Normalize feature importance vector to sum to 1.
- Source:
Returns:
-
Type
-
module:eclairjs/mllib/linalg.Vector
Param for features column name.
- Overrides:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/param.Param
getFeaturesCol() → {string}
- Overrides:
- Source:
Returns:
-
Type
-
string
getLabelCol() → {string}
- Overrides:
- Source:
Returns:
-
Type
-
string
getPredictionCol() → {string}
- Overrides:
- Source:
Returns:
-
Type
-
string
getRawPredictionCol() → {string}
- Source:
Returns:
-
Type
-
string
hasParent() → {boolean}
- Inherited From:
- Source:
Returns:
-
Type
-
boolean
Param for label column name.
- Overrides:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/param.Param
numClasses() → {int}
- Inherited From:
- Source:
Returns:
-
Type
-
int
numFeatures() → {integer}
- Inherited From:
- Source:
Returns:
-
Type
-
integer
- Inherited From:
- Source:
Returns:
-
Type
-
module:eclairjs/ml.Estimator
Param for prediction column name.
- Overrides:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/param.Param
Param for raw prediction (a.k.a. confidence) column name.
- 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:
- Inherited From:
- Source:
Returns:
-
Type
-
object
setPredictionCol(value) → {object}
Parameters:
Name |
Type |
Description |
value |
string
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
object
Parameters:
Name |
Type |
Description |
value |
string
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/classification.ProbabilisticClassificationModel
Parameters:
Name |
Type |
Description |
value |
string
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/classification.ClassificationModel
Parameters:
Name |
Type |
Description |
value |
Array.<float>
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/classification.ProbabilisticClassificationModel
toDebugString() → {string}
- Source:
Returns:
-
Type
-
string
toString() → {string}
- Source:
Returns:
-
Type
-
string
Transforms dataset by reading from featuresCol, and appending new columns as specified by
parameters:
- predicted labels as [[predictionCol]] of type Double
- raw predictions (confidences) as [[rawPredictionCol]] of type Vector
- probability of each class as [[probabilityCol]] of type Vector.
Parameters:
- Inherited From:
- Source:
Returns:
transformed dataset
-
Type
-
module:eclairjs/sql.Dataset
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
module:eclairjs/sql/types.StructType
trees() → {Array.<module:eclairjs/ml/tree.DecisionTreeModel>}
- Source:
Returns:
-
Type
-
Array.<module:eclairjs/ml/tree.DecisionTreeModel>
treeWeights() → {Array.<float>}
- Source:
Returns:
-
Type
-
Array.<float>
uid() → {string}
An immutable unique ID for the object and its derivatives.
- Source:
Returns:
-
Type
-
string
Validates and transforms the input schema with the provided param map.
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
module:eclairjs/sql/types.StructType
- Source:
Returns:
-
Type
-
module:eclairjs/ml/util.MLWriter