-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DictionaryLearning should support more general constraints on the components #8994
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
Comments
This would be nice; my only concern is that it requires some new-ish API that I don't think we aren't using elsewhere, but this kind of API is really very convenient. For reference, SAGA in lightning takes a similar API to what you suggest, taking a function handle for the proximal operator which could be user-defined. In lightning there is also a Just to check that I'm not misunderstanding, the API you are suggesting is that the user passes a single projection function, not a chain of several, right? |
@vene: Thanks for the comments.
|
Yep. It would be even better if projection just takes a vector and returns a vector. Any kind of arguments to the projection (e.g. the norm of the ball) can be encapsulated inside the projection function using partial application. e.g. For instance:
...
|
BTW, concerning the the l2 projection, you're above expression (which appears to be the current implementation in sklearn) is not correct: it's not a projection ;). For one thing, you won't want to shrink the argument
Agreed ? I'll open another issue to that effect. |
I guess it's the question of projecting on the ball vs the sphere :P but good point indeed. |
For the record, projection onto sphere (surface of ball) is ill-defined (due to lack of convexity). E.g the origin's projection (i.e closest point) is the entire sphere ;). Just take a small nonzero vector (i.e a vector in the neighborhood of the origin), then project it onto the sphere, then let the norm of this input small vector go to zero along arbitrary directions. You obtain the entire sphere. |
Uh oh!
There was an error while loading. Please reload this page.
Description
In the reference paper, arbitrary convex compact contraints can be imposed on the dictionary atoms, as long as one can compute the euclidean projection (e.g l2 ball, elastic-net ball, fused-lasso ball, etc.). For example, sparsity can be a crucial constraint if we know from prior knowledge that the dictionary atoms / components should be sparse.
Proposal
The idea would be to allow the
DictionaryLearning
andMiniBatchDictionaryLearning
estimators take strings (e.g "enet ball") or function handles (e.gcompute_fused_lasso_projection(locals())
), to allow it customize the way the dictionary atoms are updated.Waiting for
PR #9036 merged.
The text was updated successfully, but these errors were encountered: