Description Usage Arguments Value Author(s) Examples
View source: R/unscalingFun1d.R
Unscaling in one dimension using the knots of a km object
1 2 | unscalingFun1d(y, knots, eta, standardize = FALSE, lower = NULL,
upper = NULL)
|
y |
Array with values to be unscaled |
knots |
Array obtained from the field |
eta |
Array obtained from the field |
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 |
upper |
If |
Array with size length(y)
containing the scaled uncoordinates.
Clement Chevalier clement.chevalier@unine.ch
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.