13.08.2022 Views

advanced-algorithmic-trading

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

267

classification. Overfitting means that the MMH is a very good fit for the training data but can

perform quite poorly when exposed to testing data. I discuss this issue at length in the chapter

on Model Selection and Cross Validation, under the Bias-Variance Tradeoff section.

To reiterate, our goal now becomes finding an algorithm that can produce the b j values,

which will fix the geometry of the hyperplane and hence allow determination of f(x ∗ ) for any

test observation.

If we consider Figure 19.4, we can see that the MMH is the mid-line of the widest "block"

that we can insert between the two classes such that they are perfectly separated.

Figure 19.4: Maximal margin hyperplane with support vectors (A, B and C)

One of the key features of the MMC (and subsequently SVC and SVM) is that the location

of the MMH only depends on the support vectors, which are the training observations lying

directly on the margin, but not hyperplane, boundary. See points A, B and C in Figure 19.4.

This means that the location of the MMH is not dependent upon any other training observations.

Thus it can be immediately seen that a potential drawback of the MMC is that its MMH, and

thus its classification performance, can be extremely sensitive to the support vector locations.

However it is also partially this feature that makes the SVM an attractive computational tool,

as we only need to store the support vectors in memory once it has been "trained" (when the b j

values have been fixed).

19.6 Constructing the Maximal Margin Classifier

I feel it is instructive to fully outline the optimisation problem that needs to be solved in order to

create the MMH and thus the MMC itself. While I will outline the constraints of the optimisation

problem its algorithmic solution is beyond the scope of the book. Thankfully these optimisation

routines are implemented in Scikit-Learn via the LIBSVM library[33]. If you wish to read more

about the solution to these algorithmic problems take a look at Hastie et al (2009)[51] and the

Scikit-Learn page on Support Vector Machines[12].

The procedure for determining a maximal margin hyperplane for a maximal margin classifier

is as follows. Given n training observations x 1 , ..., x n ∈ R p and n class labels y 1 , ..., y n ∈ {−1, 1},

the MMH is the solution to the following optimisation procedure:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!