powered by
Scale data lying in an arbitrary rectangle to lie in the unit rectangle, and back again
rectscale(X, rect) rectunscale(X, rect)
a matrix or data.frame with the same dimensions as
matrix
data.frame
X scaled or un-scaled as appropriate
X
a matrix or data.frame of real-valued covariates
a matrix describing a bounding rectangle for X with 2 columns and ncol(X) rows
ncol(X)
Robert B. Gramacy, rbg@vt.edu
https://bobby.gramacy.com/r_packages/plgp/
X <- matrix(runif(10, 1, 3), ncol=2) rect <- rbind(c(1,3), c(1,3)) Xs <- rectscale(X, rect) rectunscale(Xs, rect)
Run the code above in your browser using DataLab