File: makeAggregation.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 (58 lines) | stat: -rw-r--r-- 2,023 bytes parent folder | download | duplicates (3)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Aggregation.R
\name{makeAggregation}
\alias{makeAggregation}
\title{Specify your own aggregation of measures.}
\usage{
makeAggregation(id, name = id, properties, fun)
}
\arguments{
\item{id}{(\code{character(1)})\cr
Name of the aggregation method (preferably the same name as the generated function).}

\item{name}{(\code{character(1)})\cr
Long name of the aggregation method. Default is \code{id}.}

\item{properties}{(\link{character})\cr
Set of aggregation properties.
\describe{
\item{req.train}{Are prediction or train sets required to calculate the aggregation?}
\item{req.test}{Are prediction or test sets required to calculate the aggregation?}
}}

\item{fun}{(\verb{function(task, perf.test, perf.train, measure, group, pred)})\cr
Calculates the aggregated performance. In most cases you will only need the performances
\code{perf.test} and optionally \code{perf.train} on the test and training data sets.
\describe{
\item{\code{task} (\link{Task})}{The task.}
\item{\code{perf.test} (\link{numeric})}{
\link{performance} results on the test data sets.}
\item{\code{perf.train} (\link{numeric})}{
\link{performance} results on the training data sets.}
\item{\code{measure} (\link{Measure})}{
Performance measure.}
\item{\code{group} (\link{factor})}{
Grouping of resampling iterations. This encodes whether specific iterations
'belong together' (e.g. repeated CV).}
\item{\code{pred} (\link{Prediction})}{
Prediction object.}
}}
}
\value{
(\link{Aggregation}).
}
\description{
This is an advanced feature of mlr. It gives access to some
inner workings so the result might not be compatible with everything!
}
\examples{
# computes the interquartile range on all performance values
test.iqr = makeAggregation(
  id = "test.iqr", name = "Test set interquartile range",
  properties = "req.test",
  fun = function(task, perf.test, perf.train, measure, group, pred) IQR(perf.test)
)
}
\seealso{
\link{aggregations}, \link{setAggregation}
}