s2faPredict: Predict new values, given the parameters of a trained S2FA...

Description Usage Arguments Value Examples

View source: R/s2faPredict.R

Description

Predict new values, given the parameters of a trained S2FA model

Usage

1
2
s2faPredict(p, X_t_test, checkArgs = TRUE,
  checkPositiveDefinite = FALSE)

Arguments

p

parameters of a fitted S2FA

X_t_test

a matrix containing the input data; their output values would be predicted

checkArgs

whether to check the arguments are valid; it takes more time to execute

checkPositiveDefinite

whether to check the covariance matrices are valid; it takes more time to execute

Value

a list containing the transposed predicted values ($values_t) and the covariance matrix associated with them ($Sigma_t)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
params <- s2faFit(X_t=house[,2:3,drop=FALSE],
                  Z_t=house[,1,drop=FALSE],
                  type = "fa",
                  lambdaRidge=0,
                  checkArgs=FALSE)
result <- s2faPredict(p = params,
                    X_t_test = house[21:26,2:3,drop=FALSE],
                    checkArgs=TRUE,
                    checkPositiveDefinite=FALSE)
result

aciobanusebi/s2fa documentation built on Aug. 7, 2021, 6:38 a.m.