Shuffling (ML)

up:: Machine Learning

It is best practice to randomise the data before giving it to a model.

Typically data is broken down into smaller batches. The model processes each small batch. Through shuffling each batch has a variety of data from the distribution.

This way, no pattern can be inferred simply from the order of inputs.

Example in TensorflowJS

// Step 1. Shuffle the data
tf.util.shuffle(data);