File: capLargeValues.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 (67 lines) | stat: -rw-r--r-- 1,788 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/capLargeValues.R
\name{capLargeValues}
\alias{capLargeValues}
\title{Convert large/infinite numeric values in a data.frame or task.}
\usage{
capLargeValues(
  obj,
  target = character(0L),
  cols = NULL,
  threshold = Inf,
  impute = threshold,
  what = "abs"
)
}
\arguments{
\item{obj}{(\link{data.frame} | \link{Task})\cr
Input data.}

\item{target}{(\link{character})\cr
Name of the column(s) specifying the response.
Target columns will not be capped.
Default is \code{character(0)}.}

\item{cols}{(\link{character})\cr
Which columns to convert.
Default is all numeric columns.}

\item{threshold}{(\code{numeric(1)})\cr
Threshold for capping.
Every entry whose absolute value is equal or larger is converted.
Default is \code{Inf}.}

\item{impute}{(\code{numeric(1)})\cr
Replacement value for large entries.
Large negative entries are converted to \code{-impute}.
Default is \code{threshold}.}

\item{what}{(\code{character(1)})\cr
What kind of entries are affected?
\dQuote{abs} means \code{abs(x) > threshold},
\dQuote{pos} means \code{abs(x) > threshold && x > 0},
\dQuote{neg} means \code{abs(x) > threshold && x < 0}.
Default is \dQuote{abs}.}
}
\value{
(\link{data.frame})
}
\description{
Convert numeric entries which large/infinite (absolute) values
in a data.frame or task.
Only numeric/integer columns are affected.
}
\examples{
capLargeValues(iris, threshold = 5, impute = 5)
}
\seealso{
Other eda_and_preprocess: 
\code{\link{createDummyFeatures}()},
\code{\link{dropFeatures}()},
\code{\link{mergeSmallFactorLevels}()},
\code{\link{normalizeFeatures}()},
\code{\link{removeConstantFeatures}()},
\code{\link{summarizeColumns}()},
\code{\link{summarizeLevels}()}
}
\concept{eda_and_preprocess}