skcla_rf {daltoolboxdp}R Documentation

Random Forest Classifier

Description

Implements classification using Random Forest algorithm. This function wraps the RandomForestClassifier from Python's scikit-learn library.

Usage

skcla_rf(
  attribute,
  slevels,
  n_estimators = 100,
  criterion = "gini",
  max_depth = NULL,
  min_samples_split = 2,
  min_samples_leaf = 1,
  min_weight_fraction_leaf = 0,
  max_features = "sqrt",
  max_leaf_nodes = NULL,
  min_impurity_decrease = 0,
  bootstrap = TRUE,
  oob_score = FALSE,
  n_jobs = NULL,
  random_state = NULL,
  verbose = 0,
  warm_start = FALSE,
  class_weight = NULL,
  ccp_alpha = 0,
  max_samples = NULL,
  monotonic_cst = NULL
)

Arguments

attribute

Target attribute name for model building

slevels

List of possible values for classification target

n_estimators

Number of trees in random forest

criterion

Function name for measuring split quality

max_depth

Maximum tree depth value

min_samples_split

Minimum samples needed for internal node split

min_samples_leaf

Minimum samples needed at leaf node

min_weight_fraction_leaf

Minimum weighted fraction value

max_features

Number of features to consider for best split

max_leaf_nodes

Maximum number of leaf nodes

min_impurity_decrease

Minimum impurity decrease needed for split

bootstrap

Whether to use bootstrap samples

oob_score

Whether to use out-of-bag samples

n_jobs

Number of parallel jobs

random_state

Seed for random number generation

verbose

Whether to enable verbose output

warm_start

Whether to reuse previous solution

class_weight

Weights associated with classes

ccp_alpha

Complexity parameter value for pruning

max_samples

Number of samples for training estimators

monotonic_cst

Monotonicity constraints for features

Details

Tree Ensemble

Value

A Random Forest classifier object

skcla_rf object

Examples

#See an example of using `skcla_rf` at this
#https://github.com/cefet-rj-dal/daltoolboxdp/blob/main/examples/skcla_rf.md

[Package daltoolboxdp version 1.2.707 Index]