0% found this document useful (0 votes)
54 views103 pages

AK ML Lab Manual

Machine learning is the subject of the artificial intelligence and

Uploaded by

Ankit Rawat
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)
54 views103 pages

AK ML Lab Manual

Machine learning is the subject of the artificial intelligence and

Uploaded by

Ankit Rawat
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/ 103

FACULTY OF ENGINEERING AND TECHNOLOGY

MACHINE LEARNING
(203105403)

SEMESTER VII
Computer Science & Engineering Department

LABORATORY MANUAL
CERTIFICATE

This is to certify that Mr. Anurag Kumar with Enrollment No. 210303105236
has successfully completed her laboratory experiments in Machine Learning
(203105403) from the department of Computer Science and Engineering
during the academic year 2024-2025.

Date of Submission ….…………… Staff In charge …..……………

Head of Department………….……
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

TABLE OF CONTENT
SR.NO PRACTICAL LIST START END MARKS SIGN.
DATE DATE

1 Dealing with Data using Numpy,


Pandas, Statistics libraray

2 Data Analysis & Visualization on


Diwali Sales Dataset.

3 Implement Simple linear regression,


Mult-Linear Regression and logistic
regression.
4 Implement the naïve Bayesian classifier
for a sample training data set stored as
a .CSV file. Compute the accuracy of
the classifier, considering a few test data
sets.
5 Assuming a set of documents that
need to be classified, use the naïve
Bayesian Classifier model
to perform this task.
6 Decision tree-based ID3 algorithm.

7 Write a program to implement the K-


Nearest Neighbour algorithm to
classify the iris data
set.
8 Apply EM algorithm to cluster a set of
data stored in a .CSV file. Use the same
data set for clustering
using k-Means algorithm.
9 Write a program to construct a Bayesian
network considering medical data. Use
this model to demonstrate the diagnosis
of heart
patients using standard Heart Disease
Data Set.
10 Compare the various supervised learning
algorithm by using appropriate dataset.

11 Compare the various Unsupervised


learning algorithm by using the
appropriate datasets.
Build an Artificial Neural Network by
12 implementing the Backpropagation
algorithm and test the same using
appropriate
data sets.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical :- 1

Aim :- Dealing with data using numpy , pandas and statistical library.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical :- 2

Aim :- To analysis and visualize the Diwali sale data.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical :- 3
Aim :- To perform Simple linear regression, Multilinear regression and Logistic
regression.

Linear Regression :-

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

I. Multilinear Regression :-

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

II. Logistic Regression :-

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Conclusion :-
Implementing various regression models like simple linear regression, multi-linear
regression, polynomial regression, and logistic regression provides a comprehensive
approach to different predictive tasks. Simple and multi-linear regressions are
effective for linear relationships, polynomial regression handles non-linear patterns,
and logistic regression is ideal for classification problems. Each method's
applicability depends on the specific characteristics of the dataset and the nature of
the prediction task.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical - 4

AIM: Implement the naïve Bayesian classifier for a sample training


data set stored as a .CSV file. Compute the accuracy of the classifier,
considering a few test data sets.

Titanic Crash:

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical – 5

AIM: Assuming a set of documents that need to be classified, use the


naïve Bayesian Classifier model to perform this task.

Email Spam:

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical – 6

AIM: Decision tree-based ID3 algorithm.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical – 7
Aim : Write a program to implement the K-Nearest Neighbor
algorithm to classify the iris data set.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Decision Tree

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical – 8

Aim : Apply EM algorithm to cluster a set of data stored in


a .CSV file. Use the same data set for clustering using k-Means
algorithm.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical-9

Aim: Write a program to construct a Bayesian network considering medical


data. Use this model to demonstrate the diagnosis of heart patients using
standard Heart Disease Data set.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical-10

Aim : Compare the various Supervised learning algorithm by using appropriate


dataset.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical-11

Aim : Compare the various Unsupervised learning algorithm by using the


appropriate datasets.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

Practical-12

AIM: Build an Artificial Neural Network by implementing the


Backpropagation algorithm and test the same using appropriate data sets.

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236
Faculty of Engineering & Technology
Machine Learning Laboratory (203105403)
B. Tech CSE 4th Year 7th Semester

210303105236

You might also like