1. Utilize a built-in function from an existing library, such as scikit-learn. 2. Implement the algorithm independently. Tasks and Requirements: 1. Algorithm Implementation: • Employ the KNN algorithm for image classification on the CIFAR-10 dataset using both a pre-existing library function and a self-coded version. • Analyze and compare the performance of both implementations. 2. Performance Improvement Strategies: • Develop and apply strategies to enhance the performance of your self-implemented KNN algorithm. Focus on aspects like accuracy or computational efficiency. 3. Comprehensive Report: • Prepare a detailed report encompassing the following sections: • Background and Method Introduction: Provide an overview of the KNN algorithm and its application in image classification. • Dataset and Tasks Description: Describe the CIFAR-10 dataset and outline the specific classification tasks undertaken. ▪ Algorithms Used: Elaborate on the implementation details of both the library-based and self- implemented algorithms. Attach screenshot of the codes whenever necessary. • Results: Present and discuss the classification results obtained from both approaches. • Methods of Improvements: Discuss the strategies employed to enhance the performance of your algorithm, focusing on accuracy and speed. 4. Submission Format: • Submit your work in the form of Jupyter Notebook (.ipynb) and HTML files, along with the final report. Grading Criteria: Implementation of the Algorithm (40%): Demonstrated ability to effectively implement the KNN algorithm using both the library function and self-coded method (20% for each). • Preliminary Results (20%): Ability to achieve reasonable initial results from the implemented algorithms. • Algorithm Improvement and Validation (20%): Thoughtful considerations and implementations for validating and improving your algorithm, including techniques like cross-validation, hyper-parameter tuning, and efficient coding practices. Report Quality (20%): Overall quality, clarity, organization, and thoroughness of the submitted report. Please reference the materials in Lecture 2 slides for detailed information and instructions. To assist you in getting acquainted with fundamental coding techniques, such as acquiring datasets and performing basic operations, a sample answer is provided here This sample serves as a guide to help you understand the basic framework. However, it is crucial that you develop and implement your own code and strategies. You are encouraged to experiment with different hyperparameters, and the implementation of cross- validation is highly recommended.
Fig: 1