![]() The code for each section is as follows: 1. ![]() Compare the performance of the two models and summarize the results. Evaluate the performance of the two models on the test data. Train the logistic regression classifier and the naive Bayes classifier on the training data. Preprocess the data, including vectorizing the input images and one-hot encoding the target labels. ![]() The procedure for each section is as follows: Load the MNIST digit dataset. However, the naive Bayes classifier may be faster to train and may require fewer data. The logistic regression classifier is expected to outperform the naive Bayes classifier, as logistic regression is a more powerful classification technique. The performance of the two models will be compared on the basis of accuracy, precision, and recall. The models that will be used for this task are a logistic regression classifier and a naive Bayes classifier. The goal is to train a model to predict the corresponding label for any input image. The dataset is divided into a training set of 60,000 images and a test set of 10,000 images. For repeated experiments of SVM, just one coding example is enough.Ģ8 × 28 pixels. You can submit a Zip file on the blackboard. You have to submit a report, write down the procedure, corresponding code for each section, and summarize the results and performance. Report the performance of testing results and compare the performance between the algorithms. For classification, report overall accuracy metrics. SVM: For the RBF kernel Change C paramters three times and change lambda three times and retrain SVM and report testing performance. Use the following classification model: a) Normalize the data, input data b) Use Support Vector Machines with the linear kernel (random parameters) c) Use Support Vector Machines polynomial and RBF kernels (random parameters) d) SVM: For linear kernel and Polynomial kernel : select three C parameters, retrain SVM and report testing performance. You may have to change it to vector to train the model. Input image has a dimension of 28 ∗ 28 matrix size. For any input image X, the model will be trained to predict the corresponding label. Input is the image feature and Target is the digit class from 0 to 9. from keras.datasets import mnist (x train, y train), (x test, y test)=mnist. If the data is not separated, please separate the data into train and test set. It is already separated into train and test if you download from Keras. 2) Classification Task MNIST digit dataset: You can use the Keras ML library to download the dataset.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |