Square brackets around a condition: 1 if it is true, 0 if it is false.
In ML papers
[P] with a true-or-false statement P inside is the Iverson bracket: it equals 1 when P holds and 0 when it does not. It is the same as the Indicator function1[P], written without the 1. The cross-entropy for a label y can be written −∑k[y=k]logpk: only the correct class's term survives.
The rule for reading square brackets: a condition inside (an =, < or ∈) makes it an Iverson bracket; a quantity inside makes it plain grouping or an expectation's argument, E[X].
How to type it
LaTeX
Shows
[y_i = k]
[yi=k]
\left[ y_i = k \right]tall
[yi=k]
A worked example
[3>2]+[1=2]+[0≤0]=1+0+1=2
Summing brackets counts how many conditions hold.
Common confusions
[a,b] with a comma is an interval, and [a;b] is often a Concatenation; neither holds a condition.