fit()#

TotalLeastSquaresSolver.fit(data_matrix: ndarray, lhs_matrix: ndarray)[source]#

Verify dimensions, compute the singular value decomposition of the data matrix, and solve the problem.

Parameters:
data_matrix(k, d) ndarray

Data matrix \(\D\).

lhs_matrix(r, k) or (k,) ndarray

“Left-hand side” data matrix \(\Z\) (not its transpose!). If one-dimensional, assume \(r = 1\).