s2faFit: Fit S2FA to data via analytic solution

Description Usage Arguments Value Examples

View source: R/s2faFit.R

Description

Fit S2FA to data via analytic solution

Usage

1
s2faFit(X_t, Z_t, type = "fa", lambdaRidge = 0, checkArgs = TRUE)

Arguments

X_t

train input data as design matrix (must be matrix, not data.frame), i.e. row = instance, column = feature/attribute

Z_t

train output data as design matrix (must be matrix, not data.frame), i.e. row = instance, column = feature/attribute

type

"unconstrained", "fa", or "ppca"; refers to psi

lambdaRidge

L2 regularization term; must be a number

checkArgs

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

Value

final parameters learnt, i.e. a list containing nDimX, nDimZ, type, mu_z_,t Sigma_z_t, mu_t, lambda_t, psi_t. "_t" comes from "transpose"

Examples

1
2
3
4
5
6
params <- s2faFit(X_t=house[,2:3,drop=FALSE],
                  Z_t=house[,1,drop=FALSE],
                  type = "fa",
                  lambdaRidge=0,
                  checkArgs=FALSE)
params

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