Skip to content

Commit 0b24720

Browse files
remove latex formatting unnecessary
1 parent ba04459 commit 0b24720

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/classification2.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,13 +1332,13 @@ Best subset selection is applicable to any classification method ($K$-NN or othe
13321332
However, it becomes very slow when you have even a moderate
13331333
number of predictors to choose from (say, around 10). This is because the number of possible predictor subsets
13341334
grows very quickly with the number of predictors, and you have to train the model (itself
1335-
a slow process!) for each one. For example, if we have $2$ predictors—let's call
1335+
a slow process!) for each one. For example, if we have 2 predictors—let's call
13361336
them A and B—then we have 3 variable sets to try: A alone, B alone, and finally A
1337-
and B together. If we have $3$ predictors—A, B, and C—then we have 7
1337+
and B together. If we have 3 predictors—A, B, and C—then we have 7
13381338
to try: A, B, C, AB, BC, AC, and ABC. In general, the number of models
13391339
we have to train for $m$ predictors is $2^m-1$; in other words, when we
1340-
get to $10$ predictors we have over *one thousand* models to train, and
1341-
at $20$ predictors we have over *one million* models to train!
1340+
get to 10 predictors we have over *one thousand* models to train, and
1341+
at 20 predictors we have over *one million* models to train!
13421342
So although it is a simple method, best subset selection is usually too computationally
13431343
expensive to use in practice.
13441344

@@ -1360,8 +1360,8 @@ This pattern continues for as many iterations as you want. If you run the method
13601360
all the way until you run out of predictors to choose, you will end up training
13611361
$\frac{1}{2}m(m+1)$ separate models. This is a *big* improvement from the $2^m-1$
13621362
models that best subset selection requires you to train! For example, while best subset selection requires
1363-
training over 1000 candidate models with $m=10$ predictors, forward selection requires training only 55 candidate models.
1364-
Therefore we will continue the rest of this section using forward selection.
1363+
training over 1000 candidate models with 10 predictors, forward selection requires training only 55 candidate models.
1364+
Therefore we will continue the rest of this section using forward selection.
13651365

13661366
> **Note:** One word of caution before we move on. Every additional model that you train
13671367
> increases the likelihood that you will get unlucky and stumble

0 commit comments

Comments
 (0)