Hierarchy

  • RandomForestBase
    • RandomForestClassifier

Constructors

  • Create a new base random forest for a classifier or regression model.

    Parameters

    Returns RandomForestClassifier

Properties

estimators?: any[]
indexes?: number[][]
n?: number
oobResults?: {
    all: number[];
    predicted: number;
    true: number;
}[]

Out-Of-Bag results

Methods

  • Returns the confusion matrix Make sure to run train first.

    Returns

    • matrix.

    Returns number[][]

  • Predicts the output given the matrix to predict.

    Returns

    predictions

    Parameters

    • toPredict: number[][] | Matrix

    Returns number[]

  • Returns the Out-Of-Bag predictions.

    Returns

    predictions

    Returns number[]

  • Predicts the probability of a label given the matrix to predict.

    Returns

    predictions

    Parameters

    • toPredict: number[][]
    • label: number

    Returns number[]

  • Predicts the output for every tree given the matrix to predict.

    Returns

    predictions

    Parameters

    • toPredict: number[][] | Matrix

    Returns Matrix

  • retrieve the prediction given the selection method.

    Returns

    prediction

    Parameters

    • values: any[]

      predictions of the estimators.

    Returns number

  • Export the current model to JSON.

    Returns

    • Current model.

    Returns RandomForestClassifierModel

  • Train the decision tree with the given training set and labels.

    Parameters

    • trainingSet: number[][]
    • trainingValues: number[]

    Returns void

  • Load a Decision tree classifier with the given model.

    Returns

    Parameters

    • model: RandomForestClassifierModel

    Returns RandomForestClassifier

Generated using TypeDoc