View source: R/RandomForest_ranger.R
train_rf_model | R Documentation |
Train a Random Forest Model with TF-IDF Features
train_rf_model(
train_matrix,
train_labels,
ntree = 300,
mtry = NULL,
seed = 123,
verbose = TRUE,
train_df_cache_path = "train_df_cached.rds"
)
train_matrix |
A sparse matrix ('dgCMatrix') of training features. |
train_labels |
A factor vector of training labels. |
ntree |
Number of trees. Default 300. |
mtry |
Variables to consider at each split. If NULL, auto-selected. |
seed |
Random seed. Default 123. |
verbose |
Whether to print progress. Default TRUE. |
train_df_cache_path |
Path to cache the train data frame. Default "train_df_cached.rds". |
A trained 'ranger' model object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.