Skip to content

OrthogonalMatchingPursuitCV #930

Closed
Closed

Description

@mblondel

OMP has a parameter n_nonzero_coefs. Since OMP isa greedy algorithm, it is very natural to compute all the solutions, from n_nonzero_coefs=1 to ``n_nonzero_coefs=max_nonzero_coefs`.

Activity

  1. GaelVaroquaux commented on Jul 4, 2012

    @GaelVaroquaux
    Member

    I am not sure that I understand your remark.

  2. mblondel commented on Jul 4, 2012

    @mblondel
    MemberAuthor

    Since OMP is greedy, you need the solution of the model with n_nonzero_coefs=k-1 to compute the solution of the model with n_nonzero_coefs=k. If you want to tune n_nonzero_coefs for accuracy, GridSearchCV will be a total waste of time, since it will recompute the same thing again and again.

    An omp_path function could return a 2d-array W of shape (max_nonzero_coefs, n_features) where W[0] would contain a coefficient vector with only 1 non-zero coefficient, W[1] would contain 2 non-zero coefficients, and so on.
    By default, max_nonzero_coefs could be set to n_features. Instead of returning an array, a generator could also be used.

    OrthogonalMatchingPursuitCV would be an object to do cross-validation efficiently based on omp_path.

    Think of omp_path and OrthogonalMatchingPursuitCV as the counterparts of lasso_path and LassoCV but with respect to n_nonzero_coefs instead of alpha.

    Makes more sense?

  3. vene commented on Jul 4, 2012

    @vene
    Member

    I get it. Would this count as a speedup? (it's an improvement over doing a grid search, after all)

  4. mblondel commented on Jul 5, 2012

    @mblondel
    MemberAuthor

    Would this count as a speedup? (it's an improvement over doing a grid search, after all)

    If you have extra-time, I'd say you can tackle this in your GSOC.

  5. mblondel commented on Oct 9, 2013

    @mblondel
    MemberAuthor

    Fixed by @vene and @agramfort, see #2224.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions