Question: Programming assignments: 1. Write a function called kernelClassify that will return the class +1 or -1 based on the input of a single data point

 Programming assignments: 1. Write a function called kernelClassify that will return

Programming assignments: 1. Write a function called kernelClassify that will return the class +1 or -1 based on the input of a single data point to classify, a set of support vectors, their corresponding values and the b constant offset Specifically, the function will be called as: kernelClassify (dataPt, suppVecs, alphas,b) where dataPt is a numpy array with shape/size [1,6], suppVecs is a numpy array with shape/size [N,7] (the first 6 columns are features, the last column is +1 or-1 label), alphas is a numpy array with shape/size [N,1] with non-negative a values matching each vector in suppVecs, and b is a single number offset. The function will return a single number +1 or -1 to indicate whether the dataPt is in class +1 or -1 This function will use the kernel: K(x, v)- IxlIvl, where xl is the vector with the absolute lx1l values in x: lxl. This is NOT the magnitude of x Classification will be performed using: b +2a'y'K(ru), testing whether this value is above +1 or below -1 If the sum is between +1 and -1 (it is TOO CLOSE to the separator), we recommend you output 0 as your answer (but we will not take off points if you output 1 or -1 in this homework. Programming assignments: 1. Write a function called kernelClassify that will return the class +1 or -1 based on the input of a single data point to classify, a set of support vectors, their corresponding values and the b constant offset Specifically, the function will be called as: kernelClassify (dataPt, suppVecs, alphas,b) where dataPt is a numpy array with shape/size [1,6], suppVecs is a numpy array with shape/size [N,7] (the first 6 columns are features, the last column is +1 or-1 label), alphas is a numpy array with shape/size [N,1] with non-negative a values matching each vector in suppVecs, and b is a single number offset. The function will return a single number +1 or -1 to indicate whether the dataPt is in class +1 or -1 This function will use the kernel: K(x, v)- IxlIvl, where xl is the vector with the absolute lx1l values in x: lxl. This is NOT the magnitude of x Classification will be performed using: b +2a'y'K(ru), testing whether this value is above +1 or below -1 If the sum is between +1 and -1 (it is TOO CLOSE to the separator), we recommend you output 0 as your answer (but we will not take off points if you output 1 or -1 in this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!