Skip to content

Issue/64/mp_sparse_encode - #65

Open
zalgo3 wants to merge 9 commits into
developmentfrom
issue/64/mp_sparse_encode
Open

Issue/64/mp_sparse_encode#65
zalgo3 wants to merge 9 commits into
developmentfrom
issue/64/mp_sparse_encode

Conversation

@zalgo3

@zalgo3 zalgo3 commented Jul 25, 2019

Copy link
Copy Markdown
Contributor

Summary

Implement matching pursuit (MP) mode into sparse_encode function.

  • implement matching pursuit
  • write unittest

Related Issues/Wiki/Resources

@zalgo3
zalgo3 requested a review from sutkss July 25, 2019 07:04
Comment thread spmimage/decomposition/dict_learning.py Outdated
code[idx, :] = sparse_encode(X[idx, :][mask[idx, :] == 1].reshape(1, -1),
dictionary[:, mask[idx, :] == 1],
**kwargs)
code[idx, :] = sklearn.decomposition.sparse_encode(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@zalgo-edu In this function, sklearn.decomposition.sparse_encode is used.
This is the function in scikit learn. However, we should use sparse_encode defined by override here.

tol : float
Maximum norm of the residual.
"""
if tol is not None and tol < 0:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@zalgo-edu Please make sure each vector in dictionary has norm 1.
If this condition is not satisfied, please raise warning message.

@zalgo3
zalgo3 requested a review from sutkss August 9, 2019 07:46
…n_unittest

Issue/66/normalize dictionaries in unittest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants