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

Lab Assignment Week 5

Uploaded by

YASIR MOIDUTTY
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Lab Assignment Week 5

Uploaded by

YASIR MOIDUTTY
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Week 5

DS5006 - Machine Learning Lab

Instructions:
1. Please submit the assignment through Moodle in .ipynb format (python notebook)
2. The submission should contain a notebook containing all the solutions, including the
requested documentation, observations, and findings.
3. You must adequately comment on the code and mark your observations to improve its
readability.
4. Make sure to put question numbers where your answer starts.
5. Before submitting, rename the notebook file as
<roll number>_Lab Assignment-<week no.>.ipynb
6. This lab is due on the same day at 4.00 pm

Happy coding!!!

Tasks:
Q1. You are expected to explore the following question from Test-1:

Construct or plot a set of data (x; y)i; i = 1 to n, for which the least squares and least
absolute deviation estimates of (c;m) in the fit, y = c + mx, are much different. What did you
have to do to make this happen?
(Source: Regression and Other Stories by Andrew Gelman, Jennifer Hill, and Aki Vehtari,
Published by Cambridge University Press in 2020.)

Create an artificial data. Fit a line with the least squares and least absolute deviation
approaches. Analyze the parameters of the lines. Make changes to the dataset so that the
approaches will lead to "much different" lines.
(5 marks)

Q2. Download the OHSUMED dataset for text classification (see for description):
download link:
https://disi.unitn.it/moschitti/corpora/ohsumed-first-20000-docs.tar.gz
Names of the categories:
https://disi.unitn.it/moschitti/corpora/First-Level-Categories-of-Cardiovascular-Disease.txt
Use train and test splits to train and test your naive Bayes classifier. Report accuracy and
confusion matrix. Provide a brief description of your approach and observations from the
confusion matrix.
` (5 marks)

_______________________________________________________________________

You might also like