unscalingFun1d: Unscaling in one dimension

Description Usage Arguments Value Author(s) Examples

View source: R/unscalingFun1d.R

Description

Unscaling in one dimension using the knots of a km object

Usage

1
2
unscalingFun1d(y, knots, eta, standardize = FALSE, lower = NULL,
  upper = NULL)

Arguments

y

Array with values to be unscaled

knots

Array obtained from the field model@covariance@knots of a km object

eta

Array obtained from the field model@covariance@eta of a km object

standardize

If the initial values y are not in [0,S], with S the integral of the piecewise linear function equal to eta at points knots, then there is the possibility to rescale the values y by indicating in which interval they are.

lower

If standardize=TRUE, this is the lower bound of the interval where the yi's are.

upper

If standardize=TRUE, this is the upper bound of the interval where the yi's are.

Value

Array with size length(y) containing the scaled uncoordinates.

Author(s)

Clement Chevalier clement.chevalier@unine.ch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(DiceKriging)
knots <- c(1,2,3)
eta <- c(2,1,4)
t <- seq(from = 1, to = 3, length = 101)
scaled_t <- scalingFun1d(x = t,knots = knots,eta = eta)

result <- unscalingFun1d(scaled_t,knots=knots,eta=eta)
# now result is equal to t !

# an example of unscaling of uniformly distributed points to have more points in regions where eta is large.
myrands <- matrix( runif(2000),ncol=2  )

knots <- c(0,0.5,1)
eta <- c(5,1,5) # large on the bounds, low in the middle
res1 <- unscalingFun1d(y = myrands[,1] , knots=knots , eta = eta , standardize = TRUE, lower=0, upper = 1)
res2 <- unscalingFun1d(y = myrands[,2] , knots=knots , eta = eta , standardize = TRUE, lower=0, upper = 1)

plot(x=res1 , y=res2, type="p") # more points in the corners

IRSN/RobustInv documentation built on Nov. 20, 2019, 10:46 p.m.