comp_pred {FFTrees} | R Documentation |
Fit and predict competing classification algorithms
Description
comp_pred
provides a wrapper for running (i.e., fit or predict)
alternative classification algorithms to data
(i.e., data.train
or data.test
, respectively).
Usage
comp_pred(
formula,
data.train,
data.test = NULL,
algorithm = NULL,
model = NULL,
sens.w = NULL,
new.factors = "exclude",
quiet_mis = FALSE
)
Arguments
formula |
A formula (usually |
data.train |
A training dataset (as a data frame). |
data.test |
A testing dataset (as a data frame). |
algorithm |
A character string specifying an algorithm in the set:
|
model |
An optional existing model (as a |
sens.w |
Sensitivity weight parameter (numeric, from |
new.factors |
What should be done if new factor values are discovered in the test set (as a character string)? Available options:
|
quiet_mis |
A logical value passed to hide/show |
Details
The range of competing algorithms currently available includes
logistic regression (stats::glm
),
CART (rpart::rpart
),
support vector machines (e1071::svm
), and
random forests (randomForest::randomForest
).
The current support for handling missing data (or NA
values) is only rudimentary.
When enabled (via the global options allow_NA_pred
or allow_NA_crit
),
any rows in data.train
or data.test
with incomplete cases are being removed
prior to fitting or predicting a model (by using na.omit
from stats).
See the specifications of each model for more sophisticated ways of handling missing data.