pySPFM._solvers.lars.solve_regularization_path

pySPFM._solvers.lars.solve_regularization_path#

solve_regularization_path(x, y, n_lambdas, criterion='bic', use_fista=False, regressors=None)[source]#

Solve the regularization path with the LARS algorithm.

Parameters:
  • x (ndarray) – Design matrix

  • y (ndarray) – Voxel time-series

  • n_lambdas (int) – Number of lambdas to be tested

  • criterion (str, optional) – Criterion to find the optimal solution, by default “bic”

  • use_fista (bool, optional) – Whether to use FISTA in favor of LARS to solve the regularization path.

  • regressors (ndarray) – Matrix with regressors to be included in the deconvolution. Regressors are NOT included in the regularization step. By default None.

Returns:

  • coef_path (ndarray) – Estimates of the coefficients for the optimal lambda

  • lambdas (ndarray) – Lambda of the optimal solution