@@ -109,21 +109,21 @@ The curse of dimensionality
109109
110110For an estimator to be effective, you need the distance between neighboring
111111points to be less than some value :math: `d`, which depends on the problem.
112- In one dimension, this requires on average :math: `n ~ 1 /d` points.
112+ In one dimension, this requires on average :math: `n \sim 1 /d` points.
113113In the context of the above :math: `k`-NN example, if the data is described by
114114just one feature with values ranging from 0 to 1 and with :math: `n` training
115115observations, then new data will be no further away than :math: `1 /n`.
116116Therefore, the nearest neighbor decision rule will be efficient as soon as
117117:math: `1 /n` is small compared to the scale of between-class feature variations.
118118
119- If the number of features is :math: `p`, you now require :math: `n ~ 1 /d^p`
119+ If the number of features is :math: `p`, you now require :math: `n \sim 1 /d^p`
120120points. Let's say that we require 10 points in one dimension: now :math: `10 ^p`
121121points are required in :math: `p` dimensions to pave the :math: `[0 , 1 ]` space.
122122As :math: `p` becomes large, the number of training points required for a good
123123estimator grows exponentially.
124124
125125For example, if each point is just a single number (8 bytes), then an
126- effective :math: `k`-NN estimator in a paltry :math: `p~ 20 ` dimensions would
126+ effective :math: `k`-NN estimator in a paltry :math: `p \sim 20 ` dimensions would
127127require more training data than the current estimated size of the entire
128128internet (±1000 Exabytes or so).
129129
0 commit comments