MidTerm assignment
MidTerm assignment
Fall 2024-25
BCSE209P – Machine Learning lab
Mid-Term assignment
Instructions:
Write python code to develop machine learning models for the tasks given below.
For each one of the following tasks, visualize the results (before and after fitting the
model)
Your submission must include the following for each of the tasks given (wherever
applicable);
o Data pre-processing
o Visualization of data before model fitting/learning
o Code to train, test, and fit the model.
o Visualization of data
Due: 10/10/2024, 10:00 PM. Note: submission after the due time will not be considered
for grading. Lab quiz will be conducted on 08/11/2024 during lab hours.
1. Predict the class label of the following unknown sample using naïve Bayesian classification.
X = (color= “red”, type = “ordinary”, origin = “domestic”)
The training samples for the car theft database are given below.
Attributes are Color, Type, Origin, and the subject, stolen can be either yes or no
--------------------------------------------------------------------------------------------------------------
ID color type origin Class: stolen?
2. Construct a CART decision tree for iris data set. Predict the label from the
decision tree and implement it in python.
3. This data set Diabetes have 10 baseline variables age, sex, body mass index,
average blood pressure, and six blood serum measurements were obtained for each
of n = 442 diabetes patients, as well as the response of interest, a quantitative
measure of disease progression one year after baseline.
methods.
- Build Artificial Neural Network by implementing the MLP algorithm and test
accuracy (MAE, MSE, RMSE, R 2 ) for at least 3 different parameters.
************