normalizeMatrix: Normalize design matrix

View source: R/buildKrigingForrester.R

normalizeMatrixR Documentation

Normalize design matrix

Description

Normalize design by using minimum and maximum of the design values for input space. Each column has entries in the range from ymin to ymax.

Usage

normalizeMatrix(x, ymin, ymax, MARGIN = 2)

Arguments

x

design matrix in input space

ymin

minimum vector of normalized space

ymax

maximum vector of normalized space

MARGIN

a vector giving the subscripts which the function will be applied over. 1 indicates rows, 2 indicates columns. Default: 2.

Value

list with the following entries:

y

normalized design matrix in the range [ymin, ymax]

xmin

min in each column

xmax

max in each column

See Also

buildKriging

Examples

set.seed(1)
x <- matrix(c(rep(1,3), rep(2,3),rep(3,3), rep(4,3)),3,4)
## columnwise:
normalizeMatrix(x, ymin=0, ymax=1)
## rowwise
normalizeMatrix(x, ymin=0, ymax=1, MARGIN=1)
# rows with identical values are mapped to the mean:
x <- matrix(rep(0,4),2,2)
normalizeMatrix(x, ymin=0, ymax=1)


SPOT documentation built on June 26, 2022, 1:06 a.m.