eval: Evaluate the Performance of the Prediction

Description Usage Arguments Details Value See Also

Description

Evaluate the performance of the prediction using different criteria.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
evalPred(object, test.Y, cutoff = 0.5, type = c("Binary", "Continuous")[1],
  output = ifelse(type == "Continuous", list("mse"), list(c("acc", "sens",
  "spec", "auc", "ppv", "npv", "w.acc", "a.acc", "val.f")))[[1]],
  weight = rep(1, length(test.Y)), inclusion = rep(TRUE, length(test.Y)),
  Y.val = test.Y, Y.resp = rep(1, length(test.Y)))

## S4 method for signature 'PredObj'
evalPred(object, test.Y, cutoff = 0.5,
  type = c("Binary", "Continuous")[1], output = ifelse(type == "Continuous",
  list("mse"), list(c("acc", "sens", "spec", "auc", "ppv", "npv", "w.acc",
  "a.acc", "val.f")))[[1]], weight = rep(1, length(test.Y)),
  inclusion = rep(TRUE, length(test.Y)), Y.val = test.Y, Y.resp = rep(1,
  length(test.Y)))

## S4 method for signature 'ListPredObj'
evalPred(object, test.Y, cutoff, type, output, weight,
  inclusion, Y.val)

Arguments

object

A PredObj or a ListPredObj object.

test.Y

The true response.

cutoff

A cutoff for binary response.

type

The type of the response, either "Binary" or "Continuous".

output

The output types. See details.

weight

Sample weight for weighted accuracy.

inclusion

Used in thresholded accuracy.

Y.val

Used in the value function.

Details

acc: Accuracy sens: sensitivity spec: specificity auc: area under the curve ppv: positive predictive value npv: negative predictive value w.acc: weighted accuracy — w.acc = sum((Y==pred.Y)*weight)/sum(weight) a.acc: thresholded accuracy — a.acc = sum((Y==pred.Y)*inclusion)/sum(inclusion) val.f: value function — val.f = sum((Y.val==pred.Y)*weight)/sum(weight)

Value

A data.frame of performance will be retured.

See Also

dwnnel-predict


SkadiEye/ITRlearn documentation built on May 24, 2019, 1:31 a.m.