Skip to contents

This function evaluates the accuracy of either (1) a model object that contains intercept and sign or (2) directly the attributes score, intercept, sign

Usage

evaluateAccuracy(
  mod = NULL,
  X,
  y,
  clf,
  force.re.evaluation = FALSE,
  mode = "train"
)

Arguments

mod:

a model object to be used in the class prediction

X:

dataset to classify

y:

variable to predict

clf:

an object containing the different parameters of the classifier

force.re.evaluation:

evaluate again all the elements needed for accuracy (default:FALSE)

mode:

training or test mode. If training, the funciton maximizes accuracy.

Value

either (1) a model whose evaluation parameters are updated or (2) the accuracy