DecisionTree.AdaBoostStumpClassifier
— TypeAdaBoostStumpClassifier(; n_iterations::Int=0)
Adaboosted decision tree stumps. See DecisionTree.jl's documentation
Hyperparameters:
n_iterations
: number of iterations of AdaBoostrng
: the random number generator to use. Can be anInt
, which will be used to seed and create a new random number generator.
Implements fit!
, predict
, predict_proba
, get_classes
DecisionTree.DecisionTreeClassifier
— TypeDecisionTreeClassifier(; pruning_purity_threshold=0.0,
max_depth::Int=-1,
min_samples_leaf::Int=1,
min_samples_split::Int=2,
min_purity_increase::Float=0.0,
n_subfeatures::Int=0,
rng=Random.GLOBAL_RNG)
Decision tree classifier. See DecisionTree.jl's documentation
Hyperparameters:
pruning_purity_threshold
: (post-pruning) merge leaves having>=thresh
combined purity (default: no pruning)max_depth
: maximum depth of the decision tree (default: no maximum)min_samples_leaf
: the minimum number of samples each leaf needs to have (default: 1)min_samples_split
: the minimum number of samples in needed for a split (default: 2)min_purity_increase
: minimum purity needed for a split (default: 0.0)n_subfeatures
: number of features to select at random (default: keep all)rng
: the random number generator to use. Can be anInt
, which will be used to seed and create a new random number generator.
Implements fit!
, predict
, predict_proba
, get_classes
DecisionTree.DecisionTreeRegressor
— TypeDecisionTreeRegressor(; pruning_purity_threshold=0.0,
max_depth::Int-1,
min_samples_leaf::Int=5,
min_samples_split::Int=2,
min_purity_increase::Float=0.0,
n_subfeatures::Int=0,
rng=Random.GLOBAL_RNG)
Decision tree regression. See DecisionTree.jl's documentation
Hyperparameters:
pruning_purity_threshold
: (post-pruning) merge leaves having>=thresh
combined purity (default: no pruning)max_depth
: maximum depth of the decision tree (default: no maximum)min_samples_leaf
: the minimum number of samples each leaf needs to have (default: 5)min_samples_split
: the minimum number of samples in needed for a split (default: 2)min_purity_increase
: minimum purity needed for a split (default: 0.0)n_subfeatures
: number of features to select at random (default: keep all)rng
: the random number generator to use. Can be anInt
, which will be used to seed and create a new random number generator.
Implements fit!
, predict
, get_classes
DecisionTree.RandomForestClassifier
— TypeRandomForestClassifier(; n_subfeatures::Int=-1,
n_trees::Int=10,
partial_sampling::Float=0.7,
max_depth::Int=-1,
rng=Random.GLOBAL_RNG)
Random forest classification. See DecisionTree.jl's documentation
Hyperparameters:
n_subfeatures
: number of features to consider at random per split (default: -1, sqrt(# features))n_trees
: number of trees to train (default: 10)partial_sampling
: fraction of samples to train each tree on (default: 0.7)max_depth
: maximum depth of the decision trees (default: no maximum)min_samples_leaf
: the minimum number of samples each leaf needs to havemin_samples_split
: the minimum number of samples in needed for a splitmin_purity_increase
: minimum purity needed for a splitrng
: the random number generator to use. Can be anInt
, which will be used to seed and create a new random number generator. Multi-threaded forests must be seeded with anInt
Implements fit!
, predict
, predict_proba
, get_classes
DecisionTree.RandomForestRegressor
— TypeRandomForestRegressor(; n_subfeatures::Int=-1,
n_trees::Int=10,
partial_sampling::Float=0.7,
max_depth::Int=-1,
min_samples_leaf::Int=5,
rng=Random.GLOBAL_RNG)
Random forest regression. See DecisionTree.jl's documentation
Hyperparameters:
n_subfeatures
: number of features to consider at random per split (default: -1, sqrt(# features))n_trees
: number of trees to train (default: 10)partial_sampling
: fraction of samples to train each tree on (default: 0.7)max_depth
: maximum depth of the decision trees (default: no maximum)min_samples_leaf
: the minimum number of samples each leaf needs to have (default: 5)min_samples_split
: the minimum number of samples in needed for a splitmin_purity_increase
: minimum purity needed for a splitrng
: the random number generator to use. Can be anInt
, which will be used to seed and create a new random number generator. Multi-threaded forests must be seeded with anInt
Implements fit!
, predict
, get_classes
DecisionTree.apply_adaboost_stumps_proba
— Methodapply_adaboost_stumps_proba(stumps::Ensemble, coeffs, features, labels::AbstractVector)
computes P(L=label|X) for each row in features
. It returns a N_row x n_labels
matrix of probabilities, each row summing up to 1.
col_labels
is a vector containing the distinct labels (eg. ["versicolor", "virginica", "setosa"]). It specifies the column ordering of the output matrix.
DecisionTree.apply_forest_proba
— Methodapply_forest_proba(forest::Ensemble, features, col_labels::AbstractVector)
computes P(L=label|X) for each row in features
. It returns a N_row x n_labels
matrix of probabilities, each row summing up to 1.
col_labels
is a vector containing the distinct labels (eg. ["versicolor", "virginica", "setosa"]). It specifies the column ordering of the output matrix.
DecisionTree.apply_tree_proba
— Methodapply_tree_proba(::Node, features, col_labels::AbstractVector)
computes P(L=label|X) for each row in features
. It returns a N_row x n_labels
matrix of probabilities, each row summing up to 1.
col_labels
is a vector containing the distinct labels (eg. ["versicolor", "virginica", "setosa"]). It specifies the column ordering of the output matrix.