skcla_gb {daltoolboxdp}R Documentation

Gradient Boosting Classifier

Description

Implements a classifier using the Gradient Boosting algorithm. This function wraps the GradientBoostingClassifier from Python's scikit-learn library.

Usage

skcla_gb(
  attribute,
  slevels,
  loss = "log_loss",
  learning_rate = 0.1,
  n_estimators = 100,
  subsample = 1,
  criterion = "friedman_mse",
  min_samples_split = 2,
  min_samples_leaf = 1,
  min_weight_fraction_leaf = 0,
  max_depth = 3,
  min_impurity_decrease = 0,
  init = NULL,
  random_state = NULL,
  max_features = NULL,
  verbose = 0,
  max_leaf_nodes = NULL,
  warm_start = FALSE,
  validation_fraction = 0.1,
  n_iter_no_change = NULL,
  tol = 1e-04,
  ccp_alpha = 0
)

Arguments

attribute

Target attribute name for model building

slevels

Possible values for the target classification

loss

Loss function to be optimized ('log_loss', 'exponential')

learning_rate

Learning rate that shrinks the contribution of each tree

n_estimators

Number of boosting stages to perform

subsample

Fraction of samples to be used for fitting the individual base learners

criterion

Function to measure the quality of a split

min_samples_split

Minimum number of samples required to split an internal node

min_samples_leaf

Minimum number of samples required to be at a leaf node

min_weight_fraction_leaf

Minimum weighted fraction of the sum total of weights

max_depth

Maximum depth of the individual regression estimators

min_impurity_decrease

Minimum impurity decrease required for split

init

Estimator object to initialize the model

random_state

Random number generator seed

max_features

Number of features to consider for best split

verbose

Controls verbosity of the output

max_leaf_nodes

Maximum number of leaf nodes

warm_start

Whether to reuse solution of previous call

validation_fraction

Proportion of training data to set aside for validation

n_iter_no_change

Used to decide if early stopping will be used

tol

Tolerance for early stopping

ccp_alpha

Complexity parameter for cost-complexity pruning

Details

Tree Boosting

Value

A Gradient Boosting classifier object

skcla_gb object

Examples

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

[Package daltoolboxdp version 1.2.707 Index]