mS3faPredict: Predict new values, given the parameters of a trained MS3FA...

Description Usage Arguments Value Examples

View source: R/mS3faPredict.R

Description

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

Usage

1
mS3faPredict(params, testInput, testOutput)

Arguments

params

parameters of a fitted MS3FA

testInput

test input data; can contain NAs; error if a full row (input+output) is NA

testOutput

train output data; can contain NAs; error if a full row (input+output) is NA

Value

a list with two elements: '$values' only with imputed NAs, '$Sigmas' with the covariance matrices associated with them (one for each)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
houseCopy <- house
houseCopy[1:10,2:3] <- NA
houseCopy[11:20,1] <- NA
params <- mS3faFit(trainInput=houseCopy[,2:3,drop=FALSE],
                   trainOutput=houseCopy[,1,drop=FALSE],
                   params=NULL,
                   type="ppca",
                   lambdaRidge=0,
                   epsilon=1e-10,
                   maxIterations=100,
                   stopType="objfn",
                   turboEmMethods=NULL)
result <- mS3faPredict(params=params,
                       testInput=houseCopy[,2:3,drop=FALSE],
                       testOutput=houseCopy[,1,drop=FALSE])
result

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