Use the SVM package to find Theta
We use software packages that have been written (these packages are highly efficient, much more useful, and have been used by countless people to prove that they are good to use), rather than to write the softwares themselves (as we do now seldom write software for X½). Liblinear and LIBSVM are often used
Although we do not have to write the optimize function ourselves, we need to make sure that we choose c (the parameter =1/λ that bias and variance weigh in the cost function) and what kernel function to choose.
One option is not to use kernel (also known as linear kernel) and use X directly: this is when our n is large (that is, the dimensions are very high, features many) but the training samples are very small, we generally do not want to draw a very complicated boundary line (because the sample is very small, Draw a very complex boundary line will be over-fitting), but with a linear boundary.
One option is to use Gaussian kernel: This situation requires the determination of σ2 (balanced bias or variance). This is the case when the dimensions of X are not high, but the sample set is many. As in, n=2, but M is a lot of, need a similar to the circle boundary line. (i.e. a complex boundary is required)
SVM: How to use SVM