## Description

In this homework, you will implement a discrimination by regression algorithm for multiclass classification in Matlab, Python, or R. Here are the steps you need to follow:

- Read Section 10.7.3 (4
^{th}edition) or Section 10.8 (3^{rd}edition) from the textbook.

- You are given a multivariate classification data set, which contains 195 handwritten letters of size 20 pixels Ã— 16 pixels (i.e., 320 pixels). These images are from five distinct classes, namely, A, B, C, D, and E, where we have 39 data points from each class. The figure below shows five sample figures from each class. You are given two data files:
- csv: letter images,
- csv: corresponding class labels.

- Divide the data set into two parts by assigning the first 25 images from each class to the training set and the remaining 14 images to the test set.
- Learn a discrimination by regression algorithm using the sigmoid function for this multiclass classification problem. You can use the following learning parameters.

eta <- 0.01 | |

epsilon <- 1e-3 |

- Draw the objective function values throughout the iterations. Your figure should be similar to the following figure.

Iteration

- Calculate the confusion matrix for the data points in your training set using the discrimination rule you will develop using the estimated parameters. Your confusion matrix should be similar to the following matrix.

y_train y_predictedÂ 1Â 2Â 3Â 4Â 5Â Â Â Â Â Â Â Â Â Â 1 25Â 0Â 0Â 0Â 0

- 0 25 0Â 0Â 0
- 0 0 25Â 0Â 0
- 0 0Â 0 25Â 0
- 0 0Â 0Â 0 25

- Calculate the confusion matrix for the data points in your test set using the parametric discrimination rule you will develop using the estimated parameters. Your confusion matrix should be similar to the following matrix.

y_test y_predictedÂ 1Â 2Â 3Â 4Â 5Â Â Â Â Â Â Â Â Â Â 1 13Â 1Â 0Â 0Â 0

- 1 11 0Â 0Â 2
- 0 0 14Â 0Â 0
- 0 1Â 0 14Â 0
- 0 1Â 0Â 0 12