mlxtend
mlxtend copied to clipboard
Interface for a (functional) minibatch generator.
I've noticed that in order to create minibatches from training set, the easiest what to achieve this, using mlxtend, is to inherit _IterativeModel and then use _yield_minibatches_idx. Have you thought about providing a more functional interface, i.e. providing a function (generator)?
Then the call would look something like this:
for X_mb, y_mb in minibatch_gen(X_train, y_train):
...
Good point, this was originally a function -- I used it when working with TensorFlow back in the day. However, within mlxtend, I didn't see the need for having it outside the model due to the sklearn-like API. Perhaps, it would be a useful thing to have for partial_fit supporting models though.