[关闭]
@Gwater 2017-08-06T08:22:58.000000Z 字数 3535 阅读 226

Kernel Method

machine_learning


Many linear parametric models can be reformulated into 'dual representation' in which the predictions are also based on linear combinations of a kernel function.As we shall see,for models which are based on nonlinear feature space ,the kernel function is given by the relation .


so that , .


1.Dual Representations

Many linear model for regression and calssification can be reformulated in terms of dual representation in which the kernel function arises naturally.This concept will play an important role when we consider support vector machines in next chapter.Here we consider a linear regression model determinied its parameters minimixing a regularized sum-of-squares error function .


Let gradient of error function J equal to zero :

now , we define . so ,we can get this equation:

Instead of working with parameter vector w , we reformulate the J in terms of parameter vector a . so we can obtain

We now define the Gram matrix , then we can easily get .In terms of Gram matrix , the sum of squares error function can be written as :

Set the gradient of J with the respect to a equal to zero ,we can get :

If we substitute this back into the linear regression model,we obtain the following prediction for a new input X:

Thus , we see that the dual formulation allows the solution to the least-squares problem expressed entirely in terms of kernel function . However , in the dual formulation we determine the K by scalar ,which is a m*m matric . In the original parameter space formulation we get a n*n matrix . Generally , m is much larger than n ,so the dual formulation does not seem to be a good method.
Now , , this kernel function means linear kernel . A linear model can be expressed in terms of dual formulation ,in which we can easily introduce kernel method . So when we change the kernel function ,what would happend to our model .

2.Constructing Kernels

In order to exploit the function of kernel , we try to substitute linear kernel to other term.As a simple example , consider a kernel function given by :


If we take the particular case of a two-dimensional input vector x = ,we can expand out the terms and identify the corrspending nonlinear feature mapping .

so , ,it include all possible second order terms and with a particular weight between them. we get the high scalar feature ,so that a linear model can be trainned to solve a nonlinear problem.
I consider kernel function is a pre-treatment of feature space , choose a adaptive kernel function just like choosing the feature map.It can also be thought as finding a hyperplane in hign-dimensional space to classificate the sample ,which can not be seperated linearly in its original space .s

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注