File: normalise.Rd

package info (click to toggle)
r-cran-eaf 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,028 kB
  • sloc: ansic: 7,281; perl: 848; makefile: 73; sh: 43; python: 27
file content (46 lines) | stat: -rw-r--r-- 1,485 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/normalise.R
\name{normalise}
\alias{normalise}
\title{Normalise points}
\usage{
normalise(data, to_range = c(1, 2), lower = NA, upper = NA, maximise = FALSE)
}
\arguments{
\item{data}{(\code{matrix} | \code{data.frame}) \cr Matrix or data frame of numerical
values, where each row gives the coordinates of a point.}

\item{to_range}{Normalise values to this range. If the objective is
maximised, it is normalised to \code{c(to_range[1], to_range[0])}
instead.}

\item{lower, upper}{Bounds on the values. If NA, the maximum and minimum
values of each coordinate are used.}

\item{maximise}{(\code{logical()} | \code{logical(1)}) \cr Whether the objectives must be
maximised instead of minimised. Either a single logical value that applies
to all objectives or a vector of logical values, with one value per
objective.}
}
\value{
A numerical matrix
}
\description{
Normalise points per coordinate to a range, e.g., \code{c(1,2)}, where the
minimum value will correspond to 1 and the maximum to 2. If bounds are
given, they are used for the normalisation.
}
\examples{

data(SPEA2minstoptimeRichmond)
# The second objective must be maximized
head(SPEA2minstoptimeRichmond[, 1:2])

head(normalise(SPEA2minstoptimeRichmond[, 1:2], maximise = c(FALSE, TRUE)))

head(normalise(SPEA2minstoptimeRichmond[, 1:2], to_range = c(0,1), maximise = c(FALSE, TRUE)))

}
\author{
Manuel \enc{López-Ibáñez}{Lopez-Ibanez}
}