Class: DecisionTreeBase

DecisionTreeBase(criterion, params)

Generic Decision Tree model, mimicing the implementation in scikit-learn Python ML package.

Constructor

new DecisionTreeBase(criterion, params)

Instantiates a generic implementation of the decision tree. For specific implementations, such as the ones for classification or regression, see other imports in this module.
Parameters:
Name Type Description
criterion Object Class that implements a splitting criterion. For example implementation, see GiniCriterion or MSECriterion.
params Oject Configuration of the training procedure and decision tree architecture.
Properties
Name Type Attributes Description
min_impurity_decrease Number <optional>
Minimal decrease in criterion value (e.g. impurity) to form a split. Non - zero split criterion could lead to problems on some of the datasets.
min_samples_split Number <optional>
Minimal number of samples from the training dataset, with which a split can be formed. If the value is in the range of [0.0, 1.0], then the value is assumed to denote the fraction of the training dataset. If the value is greater equal 2, this is assumed to be the total number of samples.
max_depth Number <optional>
Maximum depth of the decision tree allowed.
Source:

Methods

(async) to_mermaid()

Creates a mermaid graph representation of this tree. See more here: https://mermaidjs.github.io/
Source: