Starting from:

$29

HW03: Multiclass Multilayer Perceptron 

HW03: Multiclass Multilayer Perceptron 
In this homework, you will implement a multiclass multilayer perceptron algorithm in R, Matlab, or Python. Here are the steps you need to follow: 1. Generate random data points from eight bivariate Gaussian densities with the following parameters: 𝜇"=+2.0 +2.0, Σ"=+0.8−0.6 −0.6+0.8, 𝑁"=50, 𝑦"=1 𝜇 1=−4.0 −4.0, Σ1=+0.4+0.0 +0.0+0.4, 𝑁1=50, 𝑦1=1 𝜇 3=−2.0 +2.0, Σ3=+0.8+0.6 +0.6+0.8, 𝑁3=50, 𝑦3=2 𝜇 4=+4.0 −4.0, Σ4=+0.4+0.0 +0.0+0.4, 𝑁4=50, 𝑦4=2 𝜇 5=−2.0 −2.0, Σ5=+0.8−0.6 −0.6+0.8, 𝑁5=50, 𝑦5=3 𝜇 7=+4.0 +4.0, Σ7=+0.4+0.0 +0.0+0.4, 𝑁7=50, 𝑦7=3 𝜇 8=+2.0 −2.0, Σ8=+0.8+0.6 +0.6+0.8, 𝑁8=50, 𝑦8=4 𝜇 9=−4.0 +4.0, Σ9=+0.4+0.0 +0.0+0.4, 𝑁9=50, 𝑦9=4 Your data points should be similar to the following figure.
2. Learn a multilayer perceptron using the softmax function at the output layer for this multiclass classification problem. You can use the following learning parameters.
eta <- 0.1 epsilon <- 1e-3 H <- 20 max_iteration <- 200
3. Draw the objective function values throughout the iterations. Your figure should be similar to the following figure.
4. Calculate the confusion matrix for the data points in your training set using the multilayer perceptron you will learn from the previous step. Your confusion matrix should be similar to the following matrix.
## y_truth ## y_predicted 1 2 3 4 ## 1 100 0 0 1 ## 2 0 100 0 2 ## 3 0 0 99 0 ## 4 0 0 1 97
5. Draw your decision boundaries you will calculate using the multilayer perceptron from the previous step together with data points and clearly mark misclassified data points. Your figure should be similar to the following figure.
What to submit: You need to submit your source code in a single file (.R file if you are using R, .m file if you are using Matlab, or .py file if you are using Python) and a short report explaining your approach (.doc, .docx, or .pdf file). You will put these two files in a single zip file named as STUDENTID.zip, where STUDENTID should be replaced with your 7-digit student number. How to submit: E-mail the zip file you created to mehmetgonen@ku.edu.tr with the subject line Intro2MachineLearningHW03. Please follow the exact style mentioned for the subject line and do not send a zip file named as STUDENTID.zip.

More products