Lab Assignment - 10.1
Lab Assignment - 10.1
Objective:
The objective of this lab assignment is to understand and implement Multilayer Perceptron
using Scikit-Learn.
Task 1: Create a digit recognizer using MNIST dataset collection of handwritten digits.
Task 2: Create a Multilayer model to predict diabetes on Diabetes dataset
Dataset: For this assignment, you will use MNIST dataset and Diabetes dataset containing
features and corresponding labels for classification tasks. Ensure the dataset is
preprocessed and split into features (X) and labels (y) before starting the assignment.
1) Load the train and test data (csv file), read the dataset into the data frame ‘df’
and print the shape of train data (MNIST Dataset).
2) Display any 10 images of digits from train data.
3) Train your model with MLP classifier by setting only random state and verbose
parameter, others taking as default. Display loss at each iteration.
4)Print the accuracy score of the model and plot loss value for each iteration
using Matplot lib.
5) Apply prediction of your model on test data and print both actual and predict
digit value for each image.
6) Display any two predicted images of the test data.
• Explore Scikit-learn MLP Classifier and Regressor use different types of solver
example ‘lbgs’, ‘sgd’ and different combination of hidden layers.