comp.pred
provides a wrapper for many 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,
new.factors = "exclude"
)
a formula
dataframe. A training dataset.
dataframe. A testing dataset.
string. An algorithm in the set "lr" -- logistic regression, "cart" -- decision trees, "rlr" -- regularized logistic regression, "svm" -- support vector machines, "rf" -- random forests
model. An optional existing model applied to test data
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.