$$f(x) = x^2$$
$$GI_q^{(i)}=\sum_{c=1}^{|C|}\sum_{c' \neq c } p_{qc}^{(i)} p_{qc'}^{(i)}=1-\sum_{c=1}^{|C|}(p_{qc}^{(i)})^2 \tag{3-1}$$