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)Numeric matrix of same dimensions as mat containing the fitted multiplicative pattern
Numeric matrix containing the data to fit
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