File: imputations.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 (102 lines) | stat: -rw-r--r-- 3,291 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
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImputeMethods.R
\name{imputations}
\alias{imputations}
\alias{imputeConstant}
\alias{imputeMedian}
\alias{imputeMean}
\alias{imputeMode}
\alias{imputeMin}
\alias{imputeMax}
\alias{imputeUniform}
\alias{imputeNormal}
\alias{imputeHist}
\alias{imputeLearner}
\title{Built-in imputation methods.}
\usage{
imputeConstant(const)

imputeMedian()

imputeMean()

imputeMode()

imputeMin(multiplier = 1)

imputeMax(multiplier = 1)

imputeUniform(min = NA_real_, max = NA_real_)

imputeNormal(mu = NA_real_, sd = NA_real_)

imputeHist(breaks, use.mids = TRUE)

imputeLearner(learner, features = NULL)
}
\arguments{
\item{const}{(any)\cr
Constant valued use for imputation.}

\item{multiplier}{(\code{numeric(1)})\cr
Value that stored minimum or maximum is multiplied with when imputation is done.}

\item{min}{(\code{numeric(1)})\cr
Lower bound for uniform distribution.
If NA (default), it will be estimated from the data.}

\item{max}{(\code{numeric(1)})\cr
Upper bound for uniform distribution.
If NA (default), it will be estimated from the data.}

\item{mu}{(\code{numeric(1)})\cr
Mean of normal distribution. If missing it will be estimated from the data.}

\item{sd}{(\code{numeric(1)})\cr
Standard deviation of normal distribution. If missing it will be estimated from the data.}

\item{breaks}{(\code{numeric(1)})\cr
Number of breaks to use in \link[graphics:hist]{graphics::hist}. If missing,
defaults to auto-detection via \dQuote{Sturges}.}

\item{use.mids}{(\code{logical(1)})\cr
If \code{x} is numeric and a histogram is used, impute with bin mids (default)
or instead draw uniformly distributed samples within bin range.}

\item{learner}{(\link{Learner} | \code{character(1)})\cr
Supervised learner. Its predictions will be used for imputations.
If you pass a string the learner will be created via \link{makeLearner}.
Note that the target column is not available for this operation.}

\item{features}{(\link{character})\cr
Features to use in \code{learner} for prediction.
Default is \code{NULL} which uses all available features except the target column
of the original task.}
}
\description{
The built-ins are:
\itemize{
\item \code{imputeConstant(const)} for imputation using a constant value,
\item \code{imputeMedian()} for imputation using the median,
\item \code{imputeMode()} for imputation using the mode,
\item \code{imputeMin(multiplier)} for imputing constant values shifted below the minimum
using \code{min(x) - multiplier * diff(range(x))},
\item \code{imputeMax(multiplier)} for imputing constant values shifted above the maximum
using \code{max(x) + multiplier * diff(range(x))},
\item \code{imputeNormal(mean, sd)} for imputation using normally
distributed random values. Mean and standard deviation will be calculated
from the data if not provided.
\item \code{imputeHist(breaks, use.mids)} for imputation using random values
with probabilities calculated using \code{table} or \code{hist}.
\item \code{imputeLearner(learner, features = NULL)} for imputations using the response
of a classification or regression learner.
}
}
\seealso{
Other impute: 
\code{\link{impute}()},
\code{\link{makeImputeMethod}()},
\code{\link{makeImputeWrapper}()},
\code{\link{reimpute}()}
}
\concept{impute}