Skip to content

WIP: OrthogonalMatchingPursuitCV #1042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Conversation

vene
Copy link
Member

@vene vene commented Aug 19, 2012

As discussed in issue #1930

Todo:

  • narratives?
  • coverage?

@mblondel
Copy link
Member

Cool! Thanks for tackling this Vlad!

@@ -145,6 +164,10 @@ def _gram_omp(Gram, Xy, n_nonzero_coefs, tol_0=None, tol=None,
Indices of the positions of the elements in gamma within the solution
vector

coefs, array, shape = (n_features, n_nonzero_coefs)
The first k values of column k correspond to the coefficient value
for the active features at that step.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add that it is returned only if return_path=True?

@agramfort
Copy link
Member

almost there :)

@arjoly
Copy link
Member

arjoly commented May 17, 2013

Hi @vene, what is the state of this pr?
I am highly interested in the return_path option.

@vene
Copy link
Member Author

vene commented May 19, 2013

@arjoly : It seems I forgot about it halfway, and I don't remember why, but I don't think there are any obstacles. I cannot tackle it in the next couple of days, though, but if you don't finish it in the mean while, I'll do it then.

@arjoly
Copy link
Member

arjoly commented May 19, 2013

Thanks!

@vene
Copy link
Member Author

vene commented Jul 22, 2013

I'm working on this.

coef[idx[:n_active + 1], k, n_active] = x[:n_active + 1]
else:
x, idx = out
coef[idx, k] = x
return np.squeeze(coef)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agramfort :
Here instead of alphas we can return np.arange(n_features), followed by active and coef and this should be usable as-is inside the _lars_path_residues function. Unfortunately there is duplication of normalization code and logic and OMP normalization is non-trivial when precomputing is in play. However I wonder whether many people actually use precomputing; and if so; in another context than sparse coding (where we already have a convenience function). Maybe we can simplify the logic a bit by disallowing some things, and allow power users to do it through functions instead of estimators.

@agramfort
Copy link
Member

LGTM to far. More when #2186 is merged. Tomorrow hopefully.

@mblondel
Copy link
Member

A class which implements fit / predict and takes a cv object would be nice too (possibly in another PR).

@vene
Copy link
Member Author

vene commented Jul 23, 2013

Mathieu,

We're waiting for a cleaner infrastructure for path classes and generic cv
objects, which Alex is working on. I feel that it might get hairy though.

On Tue, Jul 23, 2013 at 3:08 AM, Mathieu Blondel
notifications@github.comwrote:

A class which implements fit / predict and takes a cv object would be nice
too (possibly in another PR).


Reply to this email directly or view it on GitHubhttps://github.com//pull/1042#issuecomment-21387182
.

@vene vene closed this Jul 25, 2013
vene added 3 commits July 25, 2013 14:25
FIX: work with max_iter=1, though it does not make sense

DOC add OrthogonalMatchingPursuitCV docstrings
@vene vene reopened this Jul 25, 2013
@vene
Copy link
Member Author

vene commented Jul 25, 2013

@agramfort @mblondel @arjoly I updated this.

@vene vene closed this Jul 25, 2013
@vene
Copy link
Member Author

vene commented Jul 25, 2013

Couldn't get rid of some pesky commits without opening a new PR. #2224

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

Successfully merging this pull request may close these issues.

4 participants