Skip to content

Glossary: Probability for ML

Boolean indexing

Also written: mask, boolean mask

Putting a boolean array inside square brackets to keep only the elements where it is True. For example, `code[new]` gives the code column for new customers only, which is a way to compute conditional probabilities in code.

Where the book teaches it

Related terms

Conditional probabilityFancy indexing