CS/ECE/ME532 Assignment 9 Face Emotion Classification

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (1 vote)

1. Face Emotion Classification with Kernel Classifier. In this problem you will
apply a kernel classifier to the face emotion dataset. You may find it very helpful to
use code from an activity.

a) Build a kernel classifier using
• the squared error loss function
• an `2 regularizer with λ = 0.5.
• the Guassian Kernel K(u, v) = exp(−||u − v||2/(2σ
2
).

b) Train your classifier choosing for different values of σ and create a plot with σ on
the horizontal axis and accuracy on the vertical axis and comment on the plot.
Does your classifier achieve 0% training error?

c) Find a more realistic estimate of the accuracy of your classifier by using 8-fold
cross validation. Can you achieve perfect test accuracy?

2. Kernel Regression, Lake Mendota Clarity. The Secchi depth is a measure of
water clarity obtained by lowering a black and white disk off the shady side of a boat
and recording the depth at which the disk is no longer visible.

A dataset obtained from the University of Wisconsin’s Limnology department contains
Secchi disk readings (in meters) on Lake Mendota from 2019 and 2020. A Secchi depth
of less than 2 meters is consider poor clarity, while a Secchi depth greater than 6 meters
is consider very clear. Lake Mendota can have very clear water in late spring when native zooplankton daphnia pulicaria consume large amounts of algae and phytoplankton
(for more details, see https://blog.limnology.wisc.edu/2019/06/12/whats-behind-thisextended-phase-of-crazy-clear-water-in-lake-mendota/).

a) Use kernel ridge regression with a Gaussian kernel to fit the measurements. You
may find it useful to use code from an activity. Use regularization parameter

λ = 0.01 and scale parameter σ = 10. Plot the resulting fit, and comment
on the results. Do these parameters overfit or underfit the data? Adjust the
regularization parameter to find a visually better fit.

b) Describe how you could use k-fold cross validation to systematically find a good
value of σ and λ.