Question: Part 2 : Support Vector Machine ( SVM ) - Linear and w / RBF Kernel. 5 pts . each task Please complete the following

Part 2: Support Vector Machine (SVM)- Linear and w/ RBF Kernel. 5pts. each task
Please complete the following tasks to explore Linear Support Vector Machines (LSVM) and Support Vector Machines (SVM) with an RBF kernel. You can use Python and libraries such as scikit-learn to implement and demonstrate your work.
Task 1: Linear Support Vector Machine (LSVM)
1.Load the Iris dataset.
2.Split the data into training and testing sets.
3.Implement a Linear Support Vector Machine (SVM) classifier using scikit-learn.
4.Train the LSVM model on the training data.
5.Evaluate the LSVM model's performance on the test data and report accuracy.
Task 2: Support Vector Machine (SVM) with RBF Kernel
1 Load the Iris dataset.
2. Split the data into training and testing sets.
3. Implement a Support Vector Machine (SVM) classifier with an RBF kernel using scikit-learn.
4. Train the SVM model with the RBF kernel on the training data.
5. Evaluate the SVM model's performaice on the test data and report accuracy.
Task 3: Hyperparameter Tuning for SVM with RBF Kernel
1.Perform hyperparameter tuning for the SVM with an RBF kernel. Search for optimal values of hyperparameters such as C and y using Random Search.
2.Report the best hyperparameters for the SVM with the RBF kernel.
3.Train a new SVM model with the best hyperparameters and evaluate its performance on the test data.
Task 4: Metrics Comparison
1.Calculate and compare relevant evaluation metrics (e.g., accuracy, precision, recall, F1-score) for the LSVM from Task 1 and the SVM with an RBF kernel from Task 2.
2.Not graded: Discuss the differences in performance and characteristics between these models.
Part 2 : Support Vector Machine ( SVM ) - Linear

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!