Run.Training: The workhorse function for the training workflow

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Run.Training.R

Description

The workhorse function for the training workflow

Usage

1
2
3
4
Run.Training(Path2FeatureFile, Path2LabelFile = NULL,
  SelectedFeatures = NULL, savePath = NULL, ReturnForest = F,
  verbose = T, min.node.size = 1, num.trees = 100, mtry = NULL,
  importance = "impurity", num.threads = NULL, ...)

Arguments

Path2FeatureFile

Path to feature file in rds format. Rows are independent data, columns are features. May also contain the label information (no default)

Path2LabelFile

Either a path to a file containing the label data or (default: NULL)

SelectedFeatures

Either a vector of column numbers, or a vector of feature group names (default: NULL)

savePath

Path to where the forest object "randomForest.rds" is written to. If NULL, no output is written(default: NULL)

ReturnForest

Whether the forest object should be returned or not (default: F)

verbose

(default: T)

min.node.size

Option for ranger: Minimal node size. (default: 1)

num.trees

Option for ranger: Number of trees. (default: 100)

mtry

Option for ranger: Number of variables to possibly split at in each node. Default is the (rounded down) square root of the number variables.

importance

Option for ranger: Variable importance mode, one of 'none', 'impurity', 'permutation'. (default: 'impurity')

num.threads

Option for ranger: Number of threads. Default is number of CPUs available.

...

Additional parameters passed to function ranger, see ranger::ranger

Details

Trains a random forest classification algorithm on the Feature file in Trainingfolder using the labels from LabelFile or LabelType. Saves the output (the random forest object) in a new subfolder of TrainingData

Value

Returns either TRUE if forest has been saved successfully or returns the forest object itself

Author(s)

Carlus Deneke

See Also

Other TrainingFunctions: Create.TrainingDataSet, SelectFeatureSubset

Examples

1
2
3
4
## Not run: 
Run.Training (Path2FeatureFile = Path2FeatureFile, Path2LabelFile = Path2LabelFile, SelectedFeatures = NULL, savePath = savePath, ReturnForest = F, verbose = T, min.node.size = 1, num.trees = 100, mtry = NULL, importance = 'impurity', num.threads = NULL)

## End(Not run)

crarlus/paprbag documentation built on May 14, 2019, 11:31 a.m.