What is Mini Batch?

What is Mini Batch and how can i use this in a program?

hey @maitraanirban25 ,
Instead of training our model / updation of our gradients based on each record ( also called stochastic method ), we create batches of our dataset and while iterating over these batches we update our gradient.

for example , Lets assume we have 500 records in our dataset ,
so instead of updating our model on on each record, we make mini batches say each batch contains 50 records . So now we have such batches with us.
So we will iterate 10 times taking a batch everytime , calculate total loss , error of a batch, calculate gradient of that batch and then update our model’s theta values based on it.

to implement it , first try on your own and if still you aren’t able to get it done , you can refer here

I hope this would have resolved your doubt.
Thank You and Happy learning :slightly_smiling_face:.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.