$24
In this programming assignment, you will practice some of the learning algorithms that were discussed in class. In particular, you will implement a k-Nearest Neighbor (kNN) classifier, Perceptron algorithm and Linear Regression and evaluate them.You will see how a machine learning pipeline is set up in general and how models are evaluated.
We have written a code execution pipeline for you in the form of jupyter notebook. You will have to complete the `Classes` and `Functions` as instructed in the jupyter notebook
Setup
This assignment is to be in python3 (3.4). Make sure you have the correct version installed. You will also need following python packages :
- numpy (1.14.0)
- scipy (0.19.1)
- sklearn (0.19.0)
- matplotlib (2.1.2)
- jupyter (1.0.0)
There are multiple ways you can install python3. Below are some (in no order of preference)
- You can use a virtualbox with all the setup by downloading from <http://bytes.usc.edu/files/cs103/VM/StudentVM_Spring2018.ova
- You can use anaconda distribution of python (<https://www.anaconda.com/download/)
- You can use `virtualenv` to configure `python3` environment for this Programming assignment and more to come.
- You can use native `python3` installation by downloading python3 from <https://www.python.org/ for windows. Linux and Mac may already have a `python3` installation.
To install packages use pip3. The assignment has been tested with package versions as mentioned above. If you face any difficulties with other versions please bring to our notice. We have all listed all packages in requirements.txt. To install all packages using that you can run `pip3 install --user -r requirements.txt`
To work on the assignment once the setup is done.
- Navigate to the folder and start `jupyter notebook` command.
- Open browser and type `localhost:8000` in the url tab.
- Open `main.ipynb` from the listed files.
- Read and follow the Instructions there in
Submission Instructions:
- To submit just push the code to your private GitHub repository.
- Do not change the file or folder names.
- You can keep pushing the code to the github repository as much as you want. We will consider most recent commit before the date.
- You can submit the request for using one of the late days in the form posted on Piazza.
- Make sure to submit the executed notebook with results (& plots), do not submit a cleared notebook.
- Problem 1, 2 and 3 can be attempted in any order.
Points
This programming assignment has three problems. All are within `main.ipynb` and are worth following points
- Linear Regression (10 points)
- k-Nearest Neighbor (10 points)
- Perceptron (5 points)
Due date for submission of this assignment is 11:59 pm Feb 11, 2018.