You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for the former the codes should be computed all at once (batch_size = n_samples) and this process iterated (alternating BCD, as it's already done), whilst
As a side effect of this code duplication, there prototype of backend _update_dict function is somewhat "dangling". E.g the shape of argument code can be (n_components, n_features) or (n_components, n_features) depending on whether it's called from within dict_learning or dict_learning_online resp.
Proposal
Have a single function dict_learning_online(batch_size=some_default) which reproduces full-batch mode (the current dict_learning function) when batch_size == n_samples.
The text was updated successfully, but these errors were encountered:
dohmatob
changed the title
DUPLICATE: dict_learning and dict_learning_online should be merged into a single func
REFACTOR: dict_learning and dict_learning_online should be merged into a single func
Jun 7, 2017
As explained in #9036, MiniBatchDictionaryLearning has been refactored and no longer calls dict_learning_online (it's now the opposite). The inconsistencies in the _dict_update function have also been fixed. Closing.
Uh oh!
There was an error while loading. Please reload this page.
Description
There is code / logic duplication between
decomposition.dict_learning.py.dict_learning
anddict_learning_online
. Formally, the code should be equivalent except, thatbatch_size = n_samples
) and this process iterated (alternating BCD, as it's already done), whilstAs a side effect of this code duplication, there prototype of backend
_update_dict
function is somewhat "dangling". E.g the shape of argumentcode
can be(n_components, n_features)
or(n_components, n_features)
depending on whether it's called from withindict_learning
ordict_learning_online
resp.Proposal
Have a single function
dict_learning_online(batch_size=some_default)
which reproduces full-batch mode (the currentdict_learning
function) whenbatch_size == n_samples
.The text was updated successfully, but these errors were encountered: