pyeeg.solvers.LSTSQSolver.solve
- LSTSQSolver.solve(X, y, alpha=0.0, M=None)
Solve the least-squares regression and return the coefficients.
Xmay be a 2-D array or a list of 2-D arrays (segments / trials). When a list is given, the covariance matrices are accumulated across trials; the number of samples must then be the same inXandyper trial.alphaandMare accepted for API compatibility but do not modify the solution.- Parameters:
X (ndarray (n_samples, n_features) or list of such) – Design matrix, or list of segments to accumulate.
y (ndarray (n_samples, n_channels) or list of such) – Target. If
yis a list of arrays, each element is treated as an individual subject / segment and thebetascoefficients are computed on the accumulated covariance matrices.alpha (float or array-like, optional) – Accepted for API compatibility; not used by this solver. Default is 0.0.
M (ndarray, optional) – Accepted for API compatibility; not used by this solver. Default is None.
- Returns:
result –
betashas shape (n_features, n_channels);infois None.- Return type: