liveBook · Manning

Shuffle

Also called shuffling

Shuffling is the random rearrangement of elements in a collection or sequence.

How 3 Manning books explain it

Deep Learning with Python, Third Edition

To randomly reorder data before splitting it so that contiguous ordering does not bias the partition.

How it is used
Uses random reordering to make training and evaluation partitions representative when source ordering is accidental.
How deep it goes
Explains the operation, demonstrates Python and Dataset APIs, and covers temporal leakage and duplicate-data caveats.
Examples
Demonstrates ordered digit classes, COCO images grouped by object type, Python random.shuffle, and Dataset .shuffle(buffer_size).
What you can do after
Apply it via random.shuffle or Dataset.shuffle while avoiding temporal leakage and overlapping evaluation data.

Read how Deep Learning with Python, Third Edition explains shuffle →

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

An operation that rearranges a collection into a random order.

How it is used
Prepares a card deck for dealing by rearranging its cards before blackjack play.
How deep it goes
Explains Set-to-array conversion, random selection, swapping, clearing, and reinsertion without discussing randomness quality.
Examples
Uses a 52-card Set assembled from suits and faces, then shuffled before cards are dealt.
What you can do after
Build it from scratch by swapping array entries and restoring their order in a Set.

Read how Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond explains shuffle →

Clojure: The Essential Reference

shuffle is a Clojure function that returns a vector containing a random permutation of the elements in a supported collection.

How it is used
Distributes randomized startup choices across equivalent servers before sequential request handling.
How deep it goes
Defines inputs, outputs, exceptions, and Fisher–Yates implementation, without detailing the algorithm’s internal steps.
Examples
Demonstrates randomized host ordering for round-robin requests and contrasts whole-collection permutation with single-element selection.
What you can do after
Apply it via Clojure’s shuffle function to randomize supported collections and distribute sequential choices.

Read how Clojure: The Essential Reference explains shuffle →

Also covered in

What to know first

Related concepts

Questions about shuffle

What is shuffle?

Shuffling is the random rearrangement of elements in a collection or sequence.

Which Manning books explain shuffle?

Deep Learning with Python, Third Edition, Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond and Clojure: The Essential Reference.

What should I know before learning shuffle?

Manning books that teach shuffle usually introduce array, generalization, language model and optimization first.

What is the difference between shuffle and sorting algorithm?

Shuffling is the random rearrangement of elements in a collection or sequence. A sorting algorithm is a procedure that rearranges elements of a collection into an order determined by an ordering criterion.

What is shuffle also called?

Shuffle is also called shuffling.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.