FFTrees (version 1.4.0)

comp.pred: Wrapper for classfication algorithms

Description

This function is a wrapper for many classification algorithms such as CART (rpart::rpart), logistic regression (glm), support vector machines (svm::svm) and random forests (randomForest::randomForest)

Usage

comp.pred(formula, data.train, data.test = NULL, algorithm = NULL,
  model = NULL, new.factors = "exclude")

Arguments

formula

a formula

data.train

dataframe. A training dataset

data.test

dataframe. A testing dataset

algorithm

string. An algorithm in the set "lr" -- logistic regression, cart" -- decision trees, "rlr" -- regularised logistic regression, "svm" -- support vector machines, "rf" -- random forests

model

model. An optional existing model applied to test data

new.factors

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.