AI&ML Lab Manual
AI&ML Lab Manual
AI&ML Lab Manual
BE - VII SEMESTER
ARTIFICIAL INTELLIGENCE AND
MACHINE LEARNING LABORATORY
18CSL76
Name of the student:
USN:
Section & Batch:
Program :
Page No: 1
Page No: 2
Output :
Output :
Page No: 3
2. Implement AO* Search Algorithm.
Program :
Page No: 4
Page No: 5
Page No: 6
Output :
Page No: 7
Page No: 8
3. For a given set of training data examples stored in a .CSV file, implement and
demonstrate the Candidate-Elimination algorithm to output a description of
the set of all Hypotheses consistent with the training examples.
Program:
Page No: 3
Dataset to be considered is as follows:-
Page No: 4
4. Write a program to demonstrate the working of the decision tree based ID3
algorithm. Use an appropriate data set for building the decision tree and
apply this knowledge to classify a new sample.
Program:
Page No: 5
The dataset to be considered is as follows :-
Page No: 6
Page No: 7
Page No: 8
5. Build an Artificial Neural Network by implementing the Back
propagation algorithm and test the same using appropriate data
sets.
Program:
Page No: 9
For this we consider:
ADD
Forward propagation BIAS
&
Activatio
n
FEE ADD
D h1 BIAS
FEE
x D &
1 Activatio
n
Input Layer y Output Layer
h2
Hidden Layer
Page No: 10
6. Write a program to implement the naïve Bayesian classifier for a sample
training data set stored as a .CSV file. Compute the accuracy of the
classifier, considering few test data sets.
Program:
Page No: 11
Page No: 12
The output is as follows:
Page No: 13
Page No: 14
Page No: 15
Page No: 16
7. 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. Compare the results of these
two algorithms and comment on the quality of clustering. You can add
Java/Python ML library classes/API in the program.
Program:
Page No: 21
The dataset to be considered is:
Page No: 22
The output is as follows:
Page No: 23
8. Write a program to implement k-Nearest Neighbor algorithm to classify the
iris data set. Print both correct and wrong predictions. Java/Python ML
library classes can be used for this problem.
Program:
Page No: 24
The output is as follows:
Page No: 25
9. Implement the non-parametric Locally Weighted Regression algorithm in order
to fit data points. Select appropriate data set for your experiment and draw
graphs.
Program:
Page No: 26
The dataset considered is:
The overall dataset consists of over 200 hypothesis values. Out of this First 24 are given below:
Page No: 27