Support Vector Machine (SVM) is a supervised machine learning algorithm for data classification or regression. It is particularly useful for:
- Dealing with high-dimensional data.
- Handling both linear and non-linear classification.
- Working with small to medium databases.
- Tasks such as text classification and image recognition.
Things to remember:
- Ensure data categories are of integer type, not objects. You can use
.astype
to change the type. - Utilize
param_grid
to find the best model parameters.
This project is divided into three separate files for SVM analysis based on:
- Cell_samples (basic data for understanding SVM).
- Breast_cancer (classification based on cancer type recognition).
- Iris_project (classification of flowers).
Methodology:
- Download required libraries (Pandas, NumPy, Scikit-learn, Matplotlib).
- Load and explore the interesting data.
- Understand the data and perform basic visualization and data wrangling.
- Define the features (X) and target (y) variables for analysis.
- Split the data into training and testing sets.
- Build SVM models.
- Evaluate model performance by printing the confusion matrix and classification report to analyze the results.