Lasso Fista

class mrinversion.linear_model.LassoFista(lambda1=0.001, max_iterations=50000, tolerance=0.0052, positive=True, inverse_dimension=None)[source]

Bases: object

Methods Documentation

fit(K, s, warm_start=False)[source]
predict(K)[source]

Predict the signal using the linear model.

Parameters:

K (ndarray) – A \(m \times n\) kernel matrix, \({\bf K}\). A numpy array of shape (m, n).

Returns:

A numpy array of shape (m, m_count) with the predicted values

Return type:

ndarray

residuals(K, s)[source]

Return the residual as the difference the data and the predicted data(fit), following

(22)\[\text{residuals} = {\bf s - Kf^*}\]

where \({\bf f^*}\) is the optimum solution.

Parameters:
  • K (ndarray.) – A \(m \times n\) kernel matrix, \({\bf K}\). A numpy array of shape (m, n).

  • s (ndarray ot CSDM object.) – A csdm object or a \(m \times m_\text{count}\) signal matrix, \({\bf s}\).

Returns:

If s is a csdm object, returns a csdm object with the residuals. If s is a numpy array, return a \(m \times m_\text{count}\) residue matrix. csdm object

Return type:

ndarray or CSDM object.