multiplicativeMatrixFitter: Multiplicative Pattern Fitter

View source: R/multiplicativeMatrixFitter.R

multiplicativeMatrixFitterR Documentation

Multiplicative Pattern Fitter

Description

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.

Usage

multiplicativeMatrixFitter(mat, trainMask)

Arguments

mat

Numeric matrix containing the data to fit

trainMask

Logical matrix of same dimensions as mat, indicating which cells to use for training

Details

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

Value

Numeric matrix of same dimensions as mat containing the fitted multiplicative pattern


SIMPLICA documentation built on Sept. 11, 2025, 1:08 a.m.