% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/skcla_rf.R
\name{skcla_rf}
\alias{skcla_rf}
\title{Random Forest Classifier}
\usage{
skcla_rf(
  attribute,
  slevels,
  n_estimators = 100,
  max_depth = NULL,
  min_samples_split = 2,
  min_samples_leaf = 1,
  max_features = "sqrt",
  class_weight = NULL
)
}
\arguments{
\item{attribute}{Target attribute name for model building.}

\item{slevels}{List of possible values for classification target.}

\item{n_estimators}{Number of trees in the forest.}

\item{max_depth}{Maximum tree depth value.}

\item{min_samples_split}{Minimum samples needed for an internal node split.}

\item{min_samples_leaf}{Minimum samples needed at a leaf node.}

\item{max_features}{Number of features to consider at each split. Use \code{"sqrt"}, \code{"log2"}, \code{NULL}, or a numeric value.}

\item{class_weight}{Optional weights associated with classes.}
}
\value{
A \code{skcla_rf} classifier object.
}
\description{
Implements classification using the Random Forest algorithm.
Wraps scikit-learn's \code{RandomForestClassifier} through \code{reticulate}.
}
\details{
Tree Ensemble
}
\examples{
\dontrun{
data(iris)
clf <- skcla_rf(
  attribute = "Species",
  slevels = levels(iris$Species),
  n_estimators = 200,
  max_features = "sqrt"
)
clf <- daltoolbox::fit(clf, iris)
pred <- predict(clf, iris)
table(pred, iris$Species)
}
}
\references{
Breiman, L. (2001). Random Forests. Machine Learning.
}
