Assignment - KNN and SVM

.docx

School

Indiana University, Bloomington *

*We aren’t endorsed by this school

Course

S364

Subject

Mathematics

Date

Feb 20, 2024

Type

docx

Pages

6

Uploaded by EarlNightingale4120

Report
Name(s): Adi Sarangee K353 Assignment - KNN and SVM (Total Points: 40) 1. Conceptual Questions (15 points): These questions pertain to key concepts covered during the class. This will include a series of multiple choice, fill in the blank, short answer, and matching questions. These questions are tightly linked to the learning objectives of that week. Questions are also likely candidates for exams. 2. Hands-on Exercises (15 points): These questions relate to the hands-on activity(ies). These activities are related to the content covered in the chapter and give students hands-on experience, which is highly sought after by employers for the exciting entry-level positions in the industry. 3. Student Feedback (10 points): These questions allow each student to offer feedback to the instructor of there were particular areas which were difficult or needed additional explanation. Students may form groups of up to two for assignments. You may also choose to work alone. However, the number of questions and the questions themselves will not change if you choose to work alone or with someone. If you choose to work with someone, only one of you is required to submit the assignment with BOTH of your names on it. Both of you will receive the same score for the assignment. You may choose to work individually for certain assignments, and in groups for others. However, you are responsible for making these decisions and resolving any potential conflicts (e.g., free-riding) – neither I nor the TAs will intervene. No late assignments will be accepted. In this course, turnitin.com will be utilized. Turnitin is an automated system which instructors may use to quickly and easily compare each student's assignment with billions of web sites, as well as an enormous database of student papers that grows with each submission. After the assignment is processed, as instructor I receive a report from turnitin.com that states if and how another author’s work was used in the assignment. For a more detailed look at this process visit http://www.turnitin.com. Suggestion The document is tightly styled. After every question, there is space to respond to the question. Questions use the “question” style and the blank space between questions uses the “answer” style. Students should just start typing into the space provided for the answers and their answers will be distinct from the questions to facilitate grading. 1
Name(s): Please insert your name(s) here KNN and SVM Conceptual Questions (15 points) 1. Default measure of similarity or distance used in K-Nearest Neighbors: a) Accuracy b) Mahalanobis Distance c) Precision d) Manhattan Distance e) Recall f) Euclidean Distance 2. A technique used to transform data into a higher-dimensional space in SVM: a) Decision Boundary b) Principal Component Analysis (PCA) c) Feature Scaling d) Kernel Function e) Batch Normalization f) Logistic Regression 3. The decision boundary in K-Nearest Neighbors (KNN): a) ROC Curve b) Hyperplane c) Kernel Function d) Confusion Matrix e) Precision-Recall Curve f) Voronoi Diagram 4. A technique used in KNN to reduce the impact of outliers and extreme values in the data: a) Regularization b) Weighted KNN c) Gradient Descent d) Principal Component Analysis (PCA) 5. The key idea behind the "Support Vector" in SVM: a) Data points closest to the decision boundary that determine the margin b) Data points farthest from the decision boundary c) Data points with the highest feature values d) Data points with missing values Please refer to these links for additional resources about the questions: 1. Slide Decks 2. Scikit-Learn KNN - https://scikit-learn.org/stable/modules/neighbors.html 3. Scikit-Learn SVM - https://scikit-learn.org/stable/modules/svm.html 1
Name(s): Please insert your name(s) here Hands-on Exercises (15 points) Exercise 1 - Titanic Survival Prediction with KNN Please use the Titanic dataset, which you downloaded for your last assignment, and build a KNN classifier to predict passenger survival on the Titanic based on various features. Step 1: Data Preparation Check for missing values in the variables and handle them by filling with mean values. Normalize or standardize continuous features (e.g., Age and Fare) since KNN is sensitive to the magnitude of the data. Encode categorical features (e.g., Sex) using one-hot encoding or label encoding. Step 2: Feature Selection Select the features for building the KNN classifier. For this exercise, use Pclass, Sex, Age, SibSp, Parch, and Fare as your features. 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help