CS145 Homework 3: KNN and Neural Networks

$35.00

Category: Tags: , , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

Task 1: KNN (30 points)
Task: Complete the k-nearest neighbors Jupyter notebook including codes and questions (following
the instructions and notes in knn.ipynb ). The goal of this workbook is to give you experiences
with the CIFAR-10 dataset, training and evaluating a simple classifier. Print out the entire workbook
and submit jupyter notebook together with all source codes.
cd HW3/
jupyter notebook
cd cs145/datasets
./get_datasets.sh
Task 2: Two-layer Neural Networks (70 points + 20 bonus points)
Task: Compete the two-layer neural network Jupyter notebook including codes and questions
(following the instructions and notes in toy_nn.ipynb ). Print out the entire workbook and submit
jupyter notebook together with all source codes.
Submission
Step 0: Make sure to finish the missing lines and questions in notebook.
Step 1: Convert your ipynb files to PDF files. If you have problems to do that from the
Jupyter Notebook in the browser, try to convert all your ipynb notebook files to HTML by
running ipython nbconvert –to html FILE.ipynb and print as PDF.
Step 2: Confirm that you have required files for submission: two python files ( knn.py and
neural_net.py ) and two notebook files ( knn.ipynb and toy_nn.ipynb ), which have been
converted to PDF already (you may name them as knn.pdf and toy_nn.pdf ).
Step 3: Submit a zip file of your homework to CCLE using zip_hw3.sh . Make sure you have
include all your code ( .py files) and notebook. Note: DO NOT submit dataset files.
Step 4: Check again your files can be sucessfully unzipped and click “Submit for Grading” in
CCLE. If you do not click “Submit for grading” and we probably notice a late submission
in your submission, we will apply late-time penalty. No email submission will be
accepted this time.
Grading
Grading policy of HW3: Code implementation (approx. 40%) + Results and Analysis (approx.
60%) in the notebook (excluding bonus questions) Points will be significantly deducted if you
only provide results with no required analysis in the notebook!
Points will be significantly deducted if you only provide results with no required analysis in the notebook!
Keep the academic honor code in mind.
With its status as a world-class research institution, it is critical that the University uphold the highest standards
of integrity both inside and outside the classroom. As a student and member of the UCLA community, you are
expected to demonstrate integrity in all of your academic endeavors. Accordingly, when accusations of
academic dishonesty occur, The Office of the Dean of Students is charged with investigating and adjudicating
suspected violations. Academic dishonesty, includes, but is not limited to, cheating, fabrication, plagiarism,
multiple submissions or facilitating academic misconduct.
Notes (Keep Updating)
1. Be aware of your installation if you have Python 2 and Python 3 at the same time on your
machine with diffrent python and package file path.
2. Pay attention to the indentation of code. Different code editors may have different default
indentation settings. Please make sure this does not bring errors or affect your code before
you start.
3. If you installed homebrew previously and then updated your OS system, you may have to
uninstall and reinstall homebrew.
4. If you are working in a virtual environment on OSX, you may potentially encounter errors with
matplotlib. Check here.
5. We know it is not that easy to fill in other’s code. You are free to change the code we provide
even though it is not inside the missing lines. Keep in mind that you should not change the
whole structure of the codes and we will not support the such change on code.
6. Do NOT use other functions (such as kNN or dense layer in sklearn, tensorflow or pytorch) in
your inplementation. If you report your results by using these function directly, you will get 0
points.
7. More reminders to be updated!
Acknowledgement
We thank Prof. Jonanthan Kao, Zheng Cheng, Tianwei Xing, together with Serena Yeung & Justin
Johnson, for permission to use their code written for the ECE239AS: Neural Networks & Deep
Learning (Winter 2018). This graduate course is highly recommended and helpful if you are
interested in advanced techniques in neural networks.