uf3.regression.least_squares.linear_least_squares¶
- linear_least_squares(x, y)[source]¶
Solves the linear least-squares problem Ax=y. Regularizer matrix should be concatenated to x and zero-values padded to y.
- Parameters
x (np.ndarray) – input matrix of shape (n_samples, n_features).
y (np.ndarray) – output vector of length n_samples.
- Returns
coefficients.
- Return type
solution (np.ndarray)