0% found this document useful (0 votes)
32 views

Lab Assignment - 10.1

Uploaded by

samrat.s.b729
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Lab Assignment - 10.1

Uploaded by

samrat.s.b729
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical

Course: B. Tech Type- Core


Course Code- CSET301 Course Name-AI-ML
Year- 2023 Semester- Odd
Date- 16-10-2023 - 20-10-2023 Batch- 5th Sem
LAB ASSIGNMENT - 10

CO1 CO2 CO3


Task 1 √
Task 2

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.

Q1. Write a python program to implement the following tasks:


(2 mark)
Practical

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.

Q2. Write a python program to implement the following tasks


1) Load the data (csv file), read the dataset into the data frame ‘df’ and print the
different statistical values and shape of data (Diabetes Dataset).
2) Check missing values in variables.
3) Separate the features into X and Y and print the shape.
4) Split data into separate training and test set in (80:20) ratio.
5)Train your model on Diabetes dataset with MLP classifier by setting solver as
stochastic gradient descent, alpha=0.00001, hidden layer sizes as 5, 2 for
maximum iteration of 1000.
6) Display the loss for each iteration and find accuracy of your model on the data.

Further Fun (will not be evaluated)


• Explore adam optimization technique

• Explore Scikit-learn MLP Classifier and Regressor use different types of solver
example ‘lbgs’, ‘sgd’ and different combination of hidden layers.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy