

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


(a) K(x, x′) = K 1 (x, x′) + K 2 (x, x′) (b) K(x, x′) = K 1 (x, x′) − K 2 (x, x′) (c) K(x, x′) = aK 1 (x, x′) (d) K(x, x′) = −aK 1 (x, x′) (e) K(x, x′) = K 1 (x, x′)K 2 (x, x′) (f) K(x, x′) = K 3 (φ(x), φ(x′)) (g) K(x, x′) = f (x)f (x′) (h) K(x, x′) = K^1 (x,x
′) √ K 1 (x,x)K 1 (x′,x′)
|〈x, x′〉| ≤ ||x|| · ||x′||,
with equality occurring if and only if x and x′^ are co-linear (i.e. there exists λ such that x′^ = λx).
Homework 1
from PyML import classifiers rr = classifiers.RidgeRegression(ridge = someValue)
Accuracy can be assessed using cross-validation:
results = rr.cv(data)
where data is a dataset object (see the tutorial on how to read data into PyML). By default a dataset is instantiated with a linear kernel attached to it. To use a different kernel you need to attach a new kernel to the dataset:
from PyML import ker data.attachKernel(ker.Gaussian(gamma = 2.0))
or
from PyML import ker data.attachKernel(ker.Polynomial(degree = 3))
In this question we will consider both the Gaussian and polynomial kernels:
Kgaus = exp(−γ||x − x′||^2 )
Kpoly = (1 + 〈x, x′〉)p Plot the accuracy of the classifier, measured using the success rate and the area under the ROC curve as a function of both the ridge parameter of the classifier, and the free parameter of the kernel function. Show a couple of representative cross sections of this plot for a given value of the ridge parameter, and for a given value of the kernel parameter. Comment on the results.