View source: R/multiplicativeMatrixFitter.R
multiplicativeMatrixFitter | R Documentation |
Fits a multiplicative pattern to matrix data using training data specified by a mask. The pattern is based on the outer product of centered row and column effects, creating a bilinear surface that can capture multiplicative interactions between rows and columns.
multiplicativeMatrixFitter(mat, trainMask)
mat |
Numeric matrix containing the data to fit |
trainMask |
Logical matrix of same dimensions as mat, indicating which cells to use for training |
The function creates a multiplicative pattern by:
Computing the mean of training data as baseline
Creating centered row effects (0 to nRows-1, mean-centered)
Creating centered column effects (0 to nCols-1, mean-centered)
Taking outer product to form bilinear pattern
Fitting scaling coefficient using least squares on training data
Returning baseline plus scaled pattern
Numeric matrix of same dimensions as mat containing the fitted multiplicative pattern
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.