-
Notifications
You must be signed in to change notification settings - Fork 29
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
base: development
Are you sure you want to change the base?
Conversation
code[idx, :] = sparse_encode(X[idx, :][mask[idx, :] == 1].reshape(1, -1), | ||
dictionary[:, mask[idx, :] == 1], | ||
**kwargs) | ||
code[idx, :] = sklearn.decomposition.sparse_encode( |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
…n_unittest Issue/66/normalize dictionaries in unittest
Summary
Implement matching pursuit (MP) mode into sparse_encode function.
Related Issues/Wiki/Resources