I am trying to write some code for Dictionary Learning by using scikit-learn lib in Python. But I found two function, Both function looks like same.
I want to know what is the difference between them ?
DictionaryLearning is a full-batch method, where the whole data is kept in memory during learning.
MiniBatchDictionaryLearning is a minibatch method (only n=minibatch-size items need to be in memory within each iteration), where partial_fit (= fit on minibatch) is supported to work on bigger instances without hitting memory too hard.
While the general idea is the same, these algorithms are different and target different use-cases.
If you can use the former with your memory, use it. If not, use the latter.
If using the minibatch-variant, keep in mind, that there is still an open bug in regards to partial_fit.
A general overview about large-scale computing and escpecially incremental-learning within sklearn (where MiniBatchDictionaryLearning is mentioned) can be found here. It also mentions the downside: tuning the hyperparameter minibatch-size.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With