comp_pred
provides the main wrapper for running alternative classification algorithms, such as CART (rpart::rpart
),
logistic regression (glm
), support vector machines (svm::svm
), and random forests (randomForest::randomForest
).
comp_pred(
formula,
data.train,
data.test = NULL,
algorithm = NULL,
model = NULL,
sens.w = NULL,
new.factors = "exclude"
)
A formula (usually x$formula
, for an FFTrees
object x
).
A training dataset (as data frame).
A testing dataset (as data frame).
character string. An algorithm in the set: "lr" -- logistic regression; "rlr" -- regularized logistic regression; "cart" -- decision trees; "svm" -- support vector machines; "rf" -- random forests.
model. An optional existing model, applied to the test data.
Sensitivity weight parameter (from 0 to 1, required to compute wacc
).
string. What should be done if new factor values are discovered in the test set? "exclude" = exclude (i.e.; remove these cases), "base" = predict the base rate of the criterion.