Learn R Programming

parafac4microbiome (version 1.1.2)

transformPARAFACloadings: Transform PARAFAC loadings to an orthonormal basis. Note: this function only works for 3-way PARAFAC models.

Description

Transform PARAFAC loadings to an orthonormal basis. Note: this function only works for 3-way PARAFAC models.

Usage

transformPARAFACloadings(Fac, modeToCorrect, moreOutput = FALSE)

Value

Corrected loadings of the specified mode.

Arguments

Fac

Fac object from a PARAFAC object, see parafac().

modeToCorrect

Correct the subject (1), feature (2) or time mode (3).

moreOutput

Give orthonormal basis and transformation matrices as part of output (default FALSE).

Examples

Run this code
processedFujita = processDataCube(Fujita2023, sparsityThreshold=0.99, centerMode=1, scaleMode=2)
model = parafac(processedFujita$data, nfac=2, nstart=1, verbose=FALSE)
transformedA = transformPARAFACloadings(model$Fac, 1)

Run the code above in your browser using DataLab