reconstruct {maxstablePCA} | R Documentation |
Map the data to the reconstruction given by the fit of the max_stable_prcomp function. This is done by taking the max-matrix product of the data and the reconstruction matrix from the fit.
reconstruct(fit, data)
fit |
max_stable_prcomp object. Data should be assumed to follow the same distribution as the data used in max_stable_prcomp. |
data |
array with same number of columns as the data of the fit object. |
An array of shape nrow(data), p giving the encoded representation of the data in p components which are also unit Frechet distributed which is to be takin into consideration for further analysis.
max_stable_prcomp()
, maxmatmul()
# generate some data with the desired margins
dat <- matrix(evd::rfrechet(300), 100, 3)
maxPCA <- max_stable_prcomp(dat, 2)
# look at summary to obtain further information about
# loadings the space spanned and loss function
summary(maxPCA)
# transfrom data to compressed representation
# for a representation that is p-dimensional,
# preserves the max-stable structure and is numeric solution to
# optimal reconstruction.
compr <- compress(maxPCA, dat)
# For visual examination reconstruct original vector from compressed representation
rec <- reconstruct(maxPCA, dat)