Question: Question 1 Please PROVIDE FULL CODE and OUTPUT, Please do not use AI GENERATED ANSWER Train and test Support Vector Machine ( SVM ) and
Question Please PROVIDE FULL CODE and OUTPUT, Please do not use AI GENERATED ANSWER
Train and test Support Vector Machine SVM and Multilayer Perceptron MLP classifiers
that aim for minimum probability of classification error ie we are using loss; all error in
stances are equally bad You may use a trusted implementation of training, validation, and testing
in your choice of programming language. The SVM should use a Gaussian sometimes called
radialbasis kernel. The MLP should be a singlehidden layer model with your choice of activa
tion functions for all perceptrons.
Generate independent and identically distributed iid samples for training and iid
samples for testing. All data for class l in should be generated as follows:
xrlcosthetasinthetan
where theta Uniform pipi and nNsigmaI Use rrsigma
Note: The two class sample sets will be highly overlapping two concentric disks, and due
to angular symmetry, we anticipate the best classification boundary to be a circle between the
two disks. Your SVM and MLP models will try to approximate it Since the optimal boundary is
expected to be a quadratic curve, quadratic polynomial activation functions in the hidden layer of
the MLP may be considered as to be an appropriate modeling choice. If you have time optional
not needed for assignment experiment with different activation function selections to see the effect
of this choice.
Use the training data with fold crossvalidation to determine the best hyperparameters box
constraints parameter and Gaussian kernel width for the SVM number of perceptrons in the hidden
layer for the MLP Once these hyperparameters are set, train your final SVM and MLP classifier
using the entire training data set. Apply your trained SVM and MLP classifiers to the test data set
and estimate the probability of error from this data set.
Report the following: visual and numerical demonstrations of the Kfold crossvalidation
process indicating how the hyperparameters for SVM and MLP classifiers are set; visual and
numerical demonstrations of the performance of your SVM and MLP classifiers on the test data
set. It is your responsibility to figure out how to present your results in a convincing fashion to
indicate the quality of training procedure execution, and the test performance estimate.
Hint: For hyperparameter selection, you may show the performance estimates for various
choices and indicate where the best result is achieved. For test performance, you may show the
data and classification boundary superimposed, along with an estimated probability of error from
the samples. Modify and supplement these ideas as you see appropriate.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
