View source: R/additiveMatrixFitter.R
additiveMatrixFitter | R Documentation |
Fits an additive pattern to matrix data using training data specified by a mask. The pattern is based on row and column main effects, creating an additive model where each cell value is the sum of a row effect and column effect minus the overall mean.
additiveMatrixFitter(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 an additive pattern by:
Masking non-training cells as NA to compute statistics only on training data
Computing overall mean of training data
Computing row means and column means from training data
Replacing non-finite means with overall mean as fallback
Creating additive pattern as outer sum of row and column effects minus overall mean
Numeric matrix of same dimensions as mat containing the fitted additive pattern
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.