Learn R Programming

TLBC (version 1.0)

trainRF: Train a random forest classifier

Description

Function to train a random forest classifier from some data.

Usage

trainRF(labelDir, featDirs, names, combineStanding=FALSE, strat=TRUE, ntree=500, mtry=NULL, replace=TRUE, nsample=10000, nodesize=1, sampsize=10000)

Arguments

labelDir
Path to a directory containing instance-level annotations, i.e., created by the function annotationsToLabels.
featDirs
Path to a directory (or list of directories) containing features, i.e., computed by the function sensorsToFeatures.
names
List of participant identifiers to use.
combineStanding
(Optional) If TRUE, combine the labels standing still and standing moving into a single label standing.
strat
(Optional) logical: use stratified sampling for the random forest?
ntree
(Optional) Number of trees in the random forest
mtry
(Optional) Number of variables randomly sampled as candidates at each split in the random forest.
replace
(Optional) Should sampling in the random forest be done with or without replacement?
nsample
(Optional) Number of instances to sample.
nodesize
(Optional) Minimum size of terminal nodes in the random forest.
sampsize
(Optional) Size of sample to draw for the random forest.

See Also

trainModel, trainHMM