What is meant by this indicator function?

67 Views Asked by At

In Hastie et al. (2009) p.509, it is written that $N_k=\sum_{i=1}^N I(C(i) = k)$. To my understanding, $I$ should be an indicator function.

However $C(i)$ is defined as "Each observation is assigned to one and only one cluster. These assignments can be characterized by a many to-one mapping, or encoder $k = C(i)$, that assigns the $i$th observation to the $k$th cluster".

How is the first expression an indicator function then? I don't see any true/false condition within the $I$.

1

There are 1 best solutions below

0
On BEST ANSWER

$N_k=\sum_{i=1}^N I(C(i) = k)$ is counting the number of observations assigned to the $k$th cluster. It is the number of times $C(i) = k$ is true (meaning that observation $i$ is in cluster $k$) for a particular cluster $k$, iterating over all of the observations $i = 1, \dots, N$.