4. The use of the kernel trick is key in writing efficient implementations of the support vector...
Question:
4. The use of the kernel trick is key in writing efficient implementations of the support vector machine approach to predictive modelling. The kernel trick is based on the fact that the result of a kernel function applied to a support vector and a query instance is equivalent to the result of calculating the dot product between the support vector and the query instance after a specific set of basis functions have been applied to both—in other words kernel
(d, q) = ϕ
(d) · ϕ (q).
a. Using the support vector 〈d[1], d[2]〉 and the query instance 〈q[1], q[2]〉 as examples, show that applying a polynomial kernel with p = 2, kernel
(d, q) = (d · q + 1)2, is equivalent to calculating the dot product of the support vector and query instance after applying the following set of basis functions:
b. A support vector machine model has been trained to distinguish between dosages of two drugs that cause a dangerous interaction, and those that interact safely. This model uses just two continuous features, DOSE1 and DOSE2, and two target levels, dangerous (the positive level, +1) and safe (the negative level, −1). The support vectors in the trained model are shown in the table below.
In the trained model the value of w0 is 0.3074, and the values of the α
parameters are 〈7.1655, 6.9060, 2.0033, 6.1144, 5.9538〉.
i. Using the version of the support vector machine prediction model that uses basis functions (see Equation 7.46) with the basis functions given in part (a), calculate the output of the model for a query instance with DOSE1 = 0.90 and DOSE2 = −0.90.
ii. Using the version of the support vector machine prediction model that uses a kernel function (see Equation 7.47) with the polynomial kernel function, calculate the output of the model for a query instance with DOSE1 = 0.22 and DOSE2 = 0.16.
iii. Verify that the answers calculated in parts (i) and (ii) of this question would have been the same if the alternative approach (basis functions or the polynomial kernel function) had been used in each case.
iv. Compare the amount of computation required to calculate the output of the support vector machine using the polynomial kernel function with the amount required to calculate the output of the support vector machine using the basis functions.
Step by Step Answer:
Fundamentals Of Machine Learning For Predictive Data Analytics Algorithms Worked Examples And Case Studies
ISBN: 9780262029445
1st Edition
Authors: John D. Kelleher, Brian Mac Namee, Aoife D'Arcy