Ex. 7.8
Ex. 7.8
Show that the set of functions \(\{I(\sin(\alpha x) > 0)\}\) can shatter the following points on the line:
for any \(l\). Hence the VC dimension of the class \(\{I(\sin(\alpha x) > 0)\}\) is infinite.
Soln. 7.8
Consider the labeled dataset \(\{z^{-i}, y_i\}\) where \(y_i\in {-1, 1}\) and \(i=1,..., n\). We set
We first show that \(\sin(\alpha x)\) can correctly predict the negative labels, that is, \(y_i=-1\). For any point \(x_j = 10^{-j}\) with \(y_j=-1\), we have
For \(i>j\), \(10^{i-j}\) is even and so their sum, so \(\sum_{i:y_i=-1, i > j}10^{i-j}\) can be written as \(2k\) for some \(k\in\mathbb{N}\). Therefore we can write
For \(i < j\), we have
Let \(\epsilon = 10^{-j} + \sum_{i:y_i=-1, i < j}10^{i-j}\), we know \(0 < \epsilon < 1\). Thus
so that
Thus \(\sin(\alpha x_j) < 0\) for all \(j\) such that \(y_j=-1\).
Next we show that \(\sin(\alpha x)\) can correctly predict the positive labels. For any point \(x_j=10^{-j}\) with \(y_j=1\), we have
Thus we have \(\alpha x_j \in (2k\pi, (2k+1)\pi)\) and \(\sin(\alpha x_j) > 0\).
The proof holds for any \(n\in\mathbb{N}\), thus the VC dimension of the class \(\{I(\sin(\alpha x) > 0)\}\) is infinite.