Skip to content
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

Issue/64/mp_sparse_encode #65

Open
wants to merge 9 commits into
base: development
Choose a base branch
from
Open

Conversation

zalgo3
Copy link
Contributor

@zalgo3 zalgo3 commented Jul 25, 2019

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
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
Collaborator

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
Collaborator

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