metric: performance metrics

Description Usage Arguments Details

Description

built-in performance metrics for classification, regression and survival

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
twoClassSummary(data, lev = levels(as.factor(data[, "obs"])), model = NULL,
  metric = availableMetric("twoClass"), ...)

multiClassSummary(data, lev = levels(as.factor(data[, "obs"])),
  model = NULL, metric = availableMetric("multiClass"), ...)

regressionSummary(data, lev = NULL, model,
  metric = availableMetric("regression")[1:4], ...)

survivalSummary(data, lev, model, is.prob = NA, surv.percentile = 0.5,
  max.surv.time = max(data$obs[, 1], na.rm = TRUE),
  metric = availableMetric("survival")[1:3], na.rm = TRUE, ...)

defaultSummary(data, ..., type = c(NA, "twoClass", "multiClass", "regression",
  "survival"))

requireSummary(...)

availableMetric(type = c("twoClass", "multiClass", "regression", "survival"),
  is.prob = TRUE)

Arguments

data

Data frame with columns 'obs', 'pred' and possible columns with class labels as names if class probabilities needed

lev

Class labels for a classification problem. NULL for others

model

Model names (optional)

metric

Performance metrics to be computed

...

Other argument to pass to internal methods

is.prob

TRUE or FALSE indicated if class probability is availabed in data.

surv.percentile

Percentile used to compute quantile survival time as predition if data has time to survival information.

max.surv.time

Maximum follow-up time

na.rm

Should NA rows in data be removed before metric calculation

type

Problem type, either 'twoClass', 'multiClass', 'regression' or 'survival'

Details

availableMetric gives a list of metrics currently supported. defaultSummary is a wrap over twoClassSummary, multiClass, regressionSummary and survivalSummary. It automatically determines which one to use by response in data$obs. requireSummary a variation of modifyFunction to modify defaultSummary, particularly the metric argument to request a vector of non-default metric. See modifyFunction for example


linxihui/lazyML documentation built on May 21, 2019, 6:39 a.m.