Artificial Intelligence (AI) Final Term Spring 2023
Artificial Intelligence (AI) Final Term Spring 2023
Instructions:
• Time to attempt the exam is 80 minutes. Last 10 minutes are for submission.
• Understanding of a question is part of exam. Don’t ask invigilator for any explanation.
• Plagiarism will be penalized.
• Name your solution as “<your roll number>_mid_<section>”, zip and submit.
3) 3- Choose pairs of chromosomes for mating: pair the 1st chromosome with
the 3rd chromosome and the 2nd chromosome with the 4th chromosome,
based on specified criteria. [5]
The fitness criterion is to achieve a fitness score of at least 90% of -13999. If this
criterion is not met after a maximum of three iterations, display the
chromosome with the minimum value. [10]
University of Central Punjab, Faculty of IT
Final Term Examination- Spring 23
Artificial Intelligence-Lab
You are provided with a code to read and basic preprocessing of data.
You must implement the following:
1- You must remove the mentioned columns/features: X1, X11, X12, X20 [5]
2- Perform Train Test Split considering the classes must be equal [5]
3- Implement Distance i.e. Train implemented or built-in KNN model using
training data. [5]
4- Perform Prediction using testing data at k =5 and k = 21. [10]
5- Calculate Accuracy. [5]
6- Now predict the following point with the model with better accuracy (k=5 OR k
= 21) that is stored in a separate list named as p: [10]
p= [0.1, 2.2, 0.03, 1.4, 0.05, 0.6, 0.07, 1.08, 1.9, 0.11, 8.012, 0.13, 0.014,
6.15, 0.016, 4.17, 0.018, 0.019]