File: measures.Rd

package info (click to toggle)
r-cran-mlr 2.19.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,264 kB
  • sloc: ansic: 65; sh: 13; makefile: 5
file content (310 lines) | stat: -rw-r--r-- 7,448 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/measures.R
\docType{data}
\name{measures}
\alias{measures}
\alias{featperc}
\alias{timetrain}
\alias{timepredict}
\alias{timeboth}
\alias{sse}
\alias{measureSSE}
\alias{mse}
\alias{measureMSE}
\alias{rmse}
\alias{measureRMSE}
\alias{medse}
\alias{measureMEDSE}
\alias{sae}
\alias{measureSAE}
\alias{mae}
\alias{measureMAE}
\alias{medae}
\alias{measureMEDAE}
\alias{rsq}
\alias{measureRSQ}
\alias{expvar}
\alias{measureEXPVAR}
\alias{rrse}
\alias{measureRRSE}
\alias{rae}
\alias{measureRAE}
\alias{mape}
\alias{measureMAPE}
\alias{msle}
\alias{measureMSLE}
\alias{rmsle}
\alias{measureRMSLE}
\alias{kendalltau}
\alias{measureKendallTau}
\alias{spearmanrho}
\alias{measureSpearmanRho}
\alias{mmce}
\alias{measureMMCE}
\alias{acc}
\alias{measureACC}
\alias{ber}
\alias{measureBER}
\alias{multiclass.aunu}
\alias{measureAUNU}
\alias{multiclass.aunp}
\alias{measureAUNP}
\alias{multiclass.au1u}
\alias{measureAU1U}
\alias{multiclass.au1p}
\alias{measureAU1P}
\alias{multiclass.brier}
\alias{measureMulticlassBrier}
\alias{logloss}
\alias{measureLogloss}
\alias{ssr}
\alias{measureSSR}
\alias{qsr}
\alias{measureQSR}
\alias{lsr}
\alias{measureLSR}
\alias{kappa}
\alias{measureKAPPA}
\alias{wkappa}
\alias{measureWKAPPA}
\alias{auc}
\alias{measureAUC}
\alias{brier}
\alias{measureBrier}
\alias{brier.scaled}
\alias{measureBrierScaled}
\alias{bac}
\alias{measureBAC}
\alias{tp}
\alias{measureTP}
\alias{tn}
\alias{measureTN}
\alias{fp}
\alias{measureFP}
\alias{fn}
\alias{measureFN}
\alias{tpr}
\alias{measureTPR}
\alias{tnr}
\alias{measureTNR}
\alias{fpr}
\alias{measureFPR}
\alias{fnr}
\alias{measureFNR}
\alias{ppv}
\alias{measurePPV}
\alias{npv}
\alias{measureNPV}
\alias{fdr}
\alias{measureFDR}
\alias{mcc}
\alias{measureMCC}
\alias{f1}
\alias{measureF1}
\alias{gmean}
\alias{measureGMEAN}
\alias{gpr}
\alias{measureGPR}
\alias{multilabel.hamloss}
\alias{measureMultilabelHamloss}
\alias{multilabel.subset01}
\alias{measureMultilabelSubset01}
\alias{multilabel.f1}
\alias{measureMultilabelF1}
\alias{multilabel.acc}
\alias{measureMultilabelACC}
\alias{multilabel.ppv}
\alias{measureMultilabelPPV}
\alias{multilabel.tpr}
\alias{measureMultilabelTPR}
\alias{cindex}
\alias{cindex.uno}
\alias{iauc.uno}
\alias{ibrier}
\alias{meancosts}
\alias{mcp}
\alias{db}
\alias{G1}
\alias{G2}
\alias{silhouette}
\title{Performance measures.}
\usage{
measureSSE(truth, response)

measureMSE(truth, response)

measureRMSE(truth, response)

measureMEDSE(truth, response)

measureSAE(truth, response)

measureMAE(truth, response)

measureMEDAE(truth, response)

measureRSQ(truth, response)

measureEXPVAR(truth, response)

measureRRSE(truth, response)

measureRAE(truth, response)

measureMAPE(truth, response)

measureMSLE(truth, response)

measureRMSLE(truth, response)

measureKendallTau(truth, response)

measureSpearmanRho(truth, response)

measureMMCE(truth, response)

measureACC(truth, response)

measureBER(truth, response)

measureAUNU(probabilities, truth)

measureAUNP(probabilities, truth)

measureAU1U(probabilities, truth)

measureAU1P(probabilities, truth)

measureMulticlassBrier(probabilities, truth)

measureLogloss(probabilities, truth)

measureSSR(probabilities, truth)

measureQSR(probabilities, truth)

measureLSR(probabilities, truth)

measureKAPPA(truth, response)

measureWKAPPA(truth, response)

measureAUC(probabilities, truth, negative, positive)

measureBrier(probabilities, truth, negative, positive)

measureBrierScaled(probabilities, truth, negative, positive)

measureBAC(truth, response)

measureTP(truth, response, positive)

measureTN(truth, response, negative)

measureFP(truth, response, positive)

measureFN(truth, response, negative)

measureTPR(truth, response, positive)

measureTNR(truth, response, negative)

measureFPR(truth, response, negative, positive)

measureFNR(truth, response, negative, positive)

measurePPV(truth, response, positive, probabilities = NULL)

measureNPV(truth, response, negative)

measureFDR(truth, response, positive)

measureMCC(truth, response, negative, positive)

measureF1(truth, response, positive)

measureGMEAN(truth, response, negative, positive)

measureGPR(truth, response, positive)

measureMultilabelHamloss(truth, response)

measureMultilabelSubset01(truth, response)

measureMultilabelF1(truth, response)

measureMultilabelACC(truth, response)

measureMultilabelPPV(truth, response)

measureMultilabelTPR(truth, response)
}
\arguments{
\item{truth}{(\link{factor})\cr
Vector of the true class.}

\item{response}{(\link{factor})\cr
Vector of the predicted class.}

\item{probabilities}{(\link{numeric} | \link{matrix})\cr
a) For purely binary classification measures: The predicted probabilities for the positive class as a numeric vector.
b) For multiclass classification measures: The predicted probabilities for all classes, always as a numeric matrix, where
columns are named with class labels.}

\item{negative}{(\code{character(1)})\cr
The name of the negative class.}

\item{positive}{(\code{character(1)})\cr
The name of the positive class.}
}
\description{
A performance measure is evaluated after a single train/predict step and
returns a single number to assess the quality of the prediction (or maybe
only the model, think AIC). The measure itself knows whether it wants to be
minimized or maximized and for what tasks it is applicable.

All supported measures can be found by \link{listMeasures} or as a table in the
tutorial appendix: \url{https://mlr.mlr-org.com/articles/tutorial/measures.html}.

If you want a measure for a misclassification cost matrix, look at
\link{makeCostMeasure}. If you want to implement your own measure, look at
\link{makeMeasure}.

Most measures can directly be accessed via the function named after the
scheme measureX (e.g. measureSSE).

For clustering measures, we compact the predicted cluster IDs such that they
form a continuous series starting with 1. If this is not the case, some of
the measures will generate warnings.

Some measure have parameters. Their defaults are set in the constructor
\link{makeMeasure} and can be overwritten using \link{setMeasurePars}.
}
\references{
He, H. & Garcia, E. A. (2009)
\emph{Learning from Imbalanced Data.}
IEEE Transactions on Knowledge and Data Engineering, vol. 21, no. 9. pp. 1263-1284.

H. Uno et al.
\emph{On the C-statistics for Evaluating Overall Adequacy of Risk Prediction Procedures with Censored Survival Data}
Statistics in medicine. 2011;30(10):1105-1117. \doi{10.1002/sim.4154}.

H. Uno et al.
\emph{Evaluating Prediction Rules for T-Year Survivors with Censored Regression Models}
Journal of the American Statistical Association 102, no. 478 (2007): 527-37.
}
\seealso{
Other performance: 
\code{\link{ConfusionMatrix}},
\code{\link{calculateConfusionMatrix}()},
\code{\link{calculateROCMeasures}()},
\code{\link{estimateRelativeOverfitting}()},
\code{\link{makeCostMeasure}()},
\code{\link{makeCustomResampledMeasure}()},
\code{\link{makeMeasure}()},
\code{\link{performance}()},
\code{\link{setAggregation}()},
\code{\link{setMeasurePars}()}
}
\concept{performance}
\keyword{datasets}