{"id":13469,"date":"2020-03-25T17:59:52","date_gmt":"2020-03-25T12:29:52","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/"},"modified":"2025-03-18T12:45:27","modified_gmt":"2025-03-18T07:15:27","slug":"introduction-to-support-vector-machine","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/","title":{"rendered":"Support Vector Machine (SVM) Algorithm"},"content":{"rendered":"\n<p>Support Vector Machine (SVM) is a supervised machine learning algorithm used for classification and regression tasks. It is widely applied in fields like<a href=\"https:\/\/www.mygreatlearning.com\/blog\/image-recognition\/\"> image recognition<\/a>, text classification, and bioinformatics due to its efficiency in handling high-dimensional data.<\/p>\n\n\n\n<p>In this article, we will start from the basics of <strong>SVM in machine learning<\/strong>, gradually diving into its working principles, different types, mathematical formulation, real-world applications, and implementation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-support-vector-machine-svm\"><strong>What is Support Vector Machine (SVM)?<\/strong><\/h2>\n\n\n\n<p>SVM is a classification algorithm that finds the best boundary (hyperplane) to separate different classes in a dataset. It works by identifying key data points, called <strong>support vectors<\/strong>, that influence the position of this boundary, ensuring maximum separation between categories.<\/p>\n\n\n\n<p>For example, if we have a dataset of emails labeled as spam and not spam, SVM will create a decision boundary that best separates these two groups based on features like word frequency and message length.<\/p>\n\n\n\n<style>\n    .svmViz_container {\n        width: 100%;\n        max-width: 900px;\n        margin: 0 auto 20px;\n        background-color: white;\n        border-radius: 8px;\n        box-shadow: 0 4px 6px rgba(0,0,0,0.1);\n        padding: 15px;\n        box-sizing: border-box;\n    }\n    \n    .svmViz_h1 {\n        color: #333;\n        text-align: center;\n        margin-bottom: 20px;\n        font-size: clamp(1.2rem, 5vw, 1.8rem);\n    }\n    \n    .svmViz_visualization {\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        width: 100%;\n    }\n    \n    #svmViz_svm-canvas {\n        border: 1px solid #ddd;\n        background-color: #fff;\n        margin-bottom: 15px;\n        width: 100%;\n        height: auto;\n        max-width: 600px;\n        max-height: 400px;\n    }\n    \n    .svmViz_controls {\n        display: flex;\n        flex-wrap: wrap;\n        justify-content: center;\n        gap: 10px;\n        margin-bottom: 15px;\n        width: 100%;\n    }\n    \n    .svmViz_button {\n        padding: 6px 12px;\n        background-color: #4CAF50;\n        color: white;\n        border: none;\n        border-radius: 4px;\n        cursor: pointer;\n        font-size: clamp(12px, 3vw, 14px);\n        flex: 1 0 auto;\n        max-width: 150px;\n    }\n    \n    .svmViz_button:hover {\n        background-color: #45a049;\n    }\n    \n    .svmViz_legend {\n        display: flex;\n        flex-wrap: wrap;\n        justify-content: center;\n        gap: 15px;\n        margin-bottom: 15px;\n    }\n    \n    .svmViz_legend-item {\n        display: flex;\n        align-items: center;\n        gap: 5px;\n        font-size: clamp(12px, 3vw, 14px);\n    }\n    \n    .svmViz_legend-color {\n        width: 10px;\n        height: 10px;\n        border-radius: 50%;\n        flex-shrink: 0;\n    }\n    \n    .svmViz_explanation {\n        margin-top: 15px;\n        padding: 10px;\n        background-color: #f9f9f9;\n        border-radius: 4px;\n        font-size: clamp(12px, 3.5vw, 16px);\n    }\n    \n    .svmViz_margin-line {\n        stroke: #666;\n        stroke-dasharray: 3,3;\n        stroke-width: 1;\n    }\n    \n    .svmViz_decision-boundary {\n        stroke: #000;\n        stroke-width: 2;\n    }\n    \n    .svmViz_support-vector {\n        stroke: #000;\n        stroke-width: 2;\n        fill: none;\n    }\n\n    @media (max-width: 600px) {\n        .svmViz_container {\n            padding: 10px;\n        }\n        \n        #svmViz_svm-canvas {\n            max-height: 300px;\n        }\n        \n        .svmViz_controls {\n            flex-direction: column;\n            align-items: center;\n        }\n        \n        .svmViz_button {\n            width: 100%;\n            max-width: 200px;\n        }\n    }\n<\/style>\n\n<div class=\"svmViz_container\">\n    <h2 class=\"svmViz_h1\" class=\"svmViz_h1\" id=\"support-vector-machine-svm-visualization\">Support Vector Machine (SVM) Visualization<\/h2>\n    \n    <div class=\"svmViz_visualization\">\n        <div class=\"svmViz_controls\">\n            <button id=\"svmViz_generate-btn\" class=\"svmViz_button\">Generate New Data<\/button>\n            <button id=\"svmViz_toggle-margin-btn\" class=\"svmViz_button\">Toggle Margins<\/button>\n            <button id=\"svmViz_toggle-vectors-btn\" class=\"svmViz_button\">Toggle Support Vectors<\/button>\n        <\/div>\n        \n        <div class=\"svmViz_legend\">\n            <div class=\"svmViz_legend-item\">\n                <div class=\"svmViz_legend-color\" style=\"background-color: #ff6b6b;\"><\/div>\n                <span>Class A<\/span>\n            <\/div>\n            <div class=\"svmViz_legend-item\">\n                <div class=\"svmViz_legend-color\" style=\"background-color: #4ecdc4;\"><\/div>\n                <span>Class B<\/span>\n            <\/div>\n            <div class=\"svmViz_legend-item\">\n                <div class=\"svmViz_legend-color\" style=\"background-color: #000;\"><\/div>\n                <span>Decision Boundary<\/span>\n            <\/div>\n            <div class=\"svmViz_legend-item\">\n                <div class=\"svmViz_legend-color\" style=\"background-color: #666; border: 1px dashed #666;\"><\/div>\n                <span>Margin<\/span>\n            <\/div>\n        <\/div>\n        \n        <svg id=\"svmViz_svm-canvas\" viewBox=\"0 0 600 400\" preserveAspectRatio=\"xMidYMid meet\"><\/svg>\n        \n        <div class=\"svmViz_explanation\">\n            <h3 id=\"what-svm-does\">What SVM Does:<\/h3>\n            <p>Support Vector Machines (SVM) find the optimal hyperplane that maximizes the margin between two classes. The margin is the distance between the decision boundary and the closest data points from each class, which are called support vectors.<\/p>\n            <p>In this visualization:<\/p>\n            <ul>\n                <li>The black line represents the decision boundary<\/li>\n                <li>The dashed lines represent the margins<\/li>\n                <li>Highlighted points are support vectors<\/li>\n                <li>Red and teal dots represent different classes<\/li>\n            <\/ul>\n            <p>SVM aims to find the hyperplane that has the maximum margin, as this typically leads to better generalization on unseen data.<\/p>\n        <\/div>\n    <\/div>\n<\/div>\n\n<script>\n    document.addEventListener('DOMContentLoaded', function() {\n        const svg = d3.select('#svmViz_svm-canvas');\n        const width = 600; \/\/ Logical width for SVG viewBox\n        const height = 400; \/\/ Logical height for SVG viewBox\n        \n        let showMargins = true;\n        let showSupportVectors = true;\n        \n        function generateData(n = 50) {\n            const data = [];\n            const slope = Math.random() * 0.5 + 0.5;\n            const intercept = height \/ 2;\n            const margin = 40;\n            \n            for (let i = 0; i < n; i++) {\n                const x = Math.random() * (width - 100) + 50;\n                const yLine = slope * x + intercept;\n                \n                let y, cls;\n                if (Math.random() < 0.5) {\n                    y = yLine - margin - Math.random() * 100;\n                    cls = 0;\n                } else {\n                    y = yLine + margin + Math.random() * 100;\n                    cls = 1;\n                }\n                \n                data.push({ x, y, cls, isSupport: false });\n            }\n            \n            return { data, slope, intercept, margin };\n        }\n        \n        function computeSVM(data, slope, intercept, margin) {\n            const supportVectors = [];\n            data.forEach(point => {\n                point.distance = Math.abs(point.y - (slope * point.x + intercept));\n            });\n            data.sort((a, b) => a.distance - b.distance);\n            for (let i = 0; i < Math.min(6, data.length); i++) {\n                data[i].isSupport = true;\n                supportVectors.push(data[i]);\n            }\n            return { supportVectors };\n        }\n        \n        function renderSVM(data, slope, intercept, margin) {\n            svg.selectAll('*').remove();\n            \n            if (showMargins) {\n                svg.append('line')\n                    .attr('x1', 0).attr('y1', intercept - margin)\n                    .attr('x2', width).attr('y2', slope * width + intercept - margin)\n                    .attr('class', 'svmViz_margin-line');\n                svg.append('line')\n                    .attr('x1', 0).attr('y1', intercept + margin)\n                    .attr('x2', width).attr('y2', slope * width + intercept + margin)\n                    .attr('class', 'svmViz_margin-line');\n            }\n            \n            svg.append('line')\n                .attr('x1', 0).attr('y1', intercept)\n                .attr('x2', width).attr('y2', slope * width + intercept)\n                .attr('class', 'svmViz_decision-boundary');\n            \n            svg.selectAll('circle')\n                .data(data)\n                .enter()\n                .append('circle')\n                .attr('cx', d => d.x)\n                .attr('cy', d => d.y)\n                .attr('r', d => d.isSupport && showSupportVectors ? 8 : 6)\n                .attr('fill', d => d.cls === 0 ? '#ff6b6b' : '#4ecdc4')\n                .attr('opacity', 0.8)\n                .attr('stroke', d => d.isSupport && showSupportVectors ? '#000' : 'none')\n                .attr('stroke-width', 2);\n            \n            if (showSupportVectors) {\n                data.filter(d => d.isSupport).forEach(point => {\n                    const yOnLine = slope * point.x + intercept;\n                    svg.append('line')\n                        .attr('x1', point.x).attr('y1', point.y)\n                        .attr('x2', point.x).attr('y2', yOnLine)\n                        .attr('stroke', '#666')\n                        .attr('stroke-width', 1)\n                        .attr('stroke-dasharray', '3,3');\n                });\n            }\n        }\n        \n        let { data, slope, intercept, margin } = generateData();\n        let { supportVectors } = computeSVM(data, slope, intercept, margin);\n        renderSVM(data, slope, intercept, margin);\n        \n        document.getElementById('svmViz_generate-btn').addEventListener('click', function() {\n            ({ data, slope, intercept, margin } = generateData());\n            ({ supportVectors } = computeSVM(data, slope, intercept, margin));\n            renderSVM(data, slope, intercept, margin);\n        });\n        \n        document.getElementById('svmViz_toggle-margin-btn').addEventListener('click', function() {\n            showMargins = !showMargins;\n            renderSVM(data, slope, intercept, margin);\n        });\n        \n        document.getElementById('svmViz_toggle-vectors-btn').addEventListener('click', function() {\n            showSupportVectors = !showSupportVectors;\n            renderSVM(data, slope, intercept, margin);\n        });\n    });\n<\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/d3\/7.8.2\/d3.min.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-does-svm-classify-data\"><strong>How Does SVM Classify Data?<\/strong><\/h2>\n\n\n\n<p>SVM follows these steps to classify data:<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-full zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-data-classification.png\"><img decoding=\"async\" width=\"639\" height=\"602\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-data-classification.png\" alt=\"Support Vector Machine (SVM) Data Classification Process\" class=\"wp-image-105697\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-data-classification.png 639w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-data-classification-300x283.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-data-classification-150x141.png 150w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Data Representation<\/strong>: Each data point is represented as a vector in an n-dimensional space.<\/li>\n<\/ol>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Hyperplane Selection<\/strong>: SVM finds the optimal hyperplane that separates the data into distinct classes.<\/li>\n<\/ol>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Maximizing the Margin<\/strong>: It ensures that the separation margin between classes is as wide as possible to improve generalization.<\/li>\n<\/ol>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Using Support Vectors<\/strong>: The closest points to the hyperplane (support vectors) influence its placement.<\/li>\n<\/ol>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Kernel Trick (for Non-Linearity)<\/strong>: If the data is not linearly separable, SVM transforms it into a higher dimension using kernel functions.<\/li>\n<\/ol>\n\n\n\n<p class=\"block-course-highlighter\"><strong>Also Read:<\/strong> <a href=\"https:\/\/www.mygreatlearning.com\/blog\/support-vector-regression\/\">Support Vector Regression in Machine Learning<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"mathematical-foundation-of-svm-algorithm\"><strong>Mathematical Foundation of SVM Algorithm<\/strong><\/h2>\n\n\n\n<p>For two-class classification, given a dataset <em>(xi, yi)<\/em>, where <em>xi<\/em> are feature vectors and <em>yi<\/em> are class labels (either +1 or -1), SVM aims to minimize the function:<\/p>\n\n<div class=\"formula\">\n    <p><strong>min<sub>w,b<\/sub> (1\/2) ||w||<sup>2<\/sup><\/strong><\/p>\n<\/div>\n\n<p>Subject to:<\/p>\n\n<div class=\"formula\">\n    <p><strong>y<sub>i<\/sub> (w \u00b7 x<sub>i<\/sub> + b) &ge; 1 for all i<\/strong><\/p>\n<\/div>\n\n<p>where:<\/p>\n<ul class=\"list\">\n    <li><strong>w<\/strong> represents the weight vector,<\/li>\n    <li><strong>b<\/strong> is the bias term,<\/li>\n    <li><strong>||w||<sup>2<\/sup><\/strong> ensures the maximization of the margin.<\/li>\n<\/ul>\n\n<p>In cases where data points are not entirely separable, slack variables <em>&xi;<\/em> are introduced, modifying the function as follows:<\/p>\n\n<div class=\"formula\">\n    <p><strong>min<sub>w,b,&xi; <\/sub> (1\/2) ||w||<sup>2<\/sup> + C \u03a3 &xi;<sub>i<\/sub><\/strong><\/p>\n<\/div>\n\n<p>Here, <strong>C<\/strong> controls the trade-off between maximizing the margin and minimizing classification errors.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-svm\"><strong>Types of SVM<\/strong><\/h2>\n\n\n\n<p>SVM can be classified into different types based on the nature of the dataset:<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-full zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-types.png\"><img decoding=\"async\" width=\"890\" height=\"582\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-types.png\" alt=\"\" class=\"wp-image-105698\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-types.png 890w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-types-300x196.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-types-768x502.png 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-types-150x98.png 150w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Linear SVM<\/strong>: Used when data can be separated using a straight hyperplane. It is suitable for datasets where classes are linearly separable. The decision boundary is a straight line (in 2D) or a plane (in higher dimensions).<\/li>\n<\/ol>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Non-Linear SVM<\/strong>: When data is not linearly separable, kernel functions are used to map data into a higher-dimensional space where separation is possible. Kernel functions like RBF and polynomials are commonly used in non-linear SVM.<\/li>\n<\/ol>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Support Vector Regression (SVR)<\/strong>: A variation of SVM used for regression problems instead of classification. It works similarly to classification SVM but tries to fit a function within a margin of tolerance rather than finding a strict boundary between categories.<\/li>\n<\/ol>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Hard Margin SVM<\/strong>: Assumes that the data is perfectly separable and aims to find a hyperplane that classifies all data points correctly with no tolerance for misclassification. This works well when there is a clear distinction between classes.<\/li>\n<\/ol>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Soft Margin SVM<\/strong>: Introduces slack variables to handle cases where classes may overlap slightly. It allows some misclassifications to improve generalization and prevent overfitting.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-kernel-trick-handling-non-linearity\"><strong>The Kernel Trick: Handling Non-Linearity<\/strong><\/h2>\n\n\n\n<p>Real-world data is often non-linearly separable. SVM uses <strong>kernel functions<\/strong> to transform data into a higher-dimensional space where it becomes separable. Some popular kernels include:<\/p>\n\n\n\n<ul>\n    <li>\n        <strong>Linear Kernel:<\/strong> <span style=\"font-family: 'Courier New', Courier, monospace;\">K(x, y) = x \u00b7 y<\/span> (used in <em>linear support vector machine<\/em>)\n    <\/li>\n    <li>\n        <strong>Polynomial Kernel:<\/strong> <span style=\"font-family: 'Courier New', Courier, monospace;\">K(x, y) = (x \u00b7 y + c)<sup>d<\/sup><\/span>\n    <\/li>\n    <li>\n        <strong>Radial Basis Function (RBF) Kernel:<\/strong> <span style=\"font-family: 'Courier New', Courier, monospace;\">K(x, y) = e<sup>\u2212\u03b3||x \u2212 y||<sup>2<\/sup><\/sup><\/span>\n    <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"real-world-applications-of-svm\"><strong>Real-World Applications of SVM<\/strong><\/h2>\n\n\n\n<p>SVM has practical use cases across different domains:<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-applications.png\"><img decoding=\"async\" width=\"758\" height=\"535\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-applications.png\" alt=\"Support Vector Machine (SVM)\" class=\"wp-image-105699\" style=\"width:758px;height:auto\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-applications.png 758w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-applications-300x212.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-applications-150x106.png 150w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Spam Detection<\/strong>: In this, we classify emails as spam or not spam.<\/li>\n\n\n\n<li><strong>Image Classification<\/strong>: Recognizing objects, faces, or handwritten digits.<\/li>\n\n\n\n<li><strong>Sentiment Analysis<\/strong>: Determining if a review is positive or negative.<\/li>\n\n\n\n<li><strong>Bioinformatics<\/strong>: Identifying diseases based on genetic data.<\/li>\n\n\n\n<li><strong>Financial Fraud Detection<\/strong>: Identifying unusual transaction patterns.<\/li>\n<\/ul>\n\n\n\n<p class=\"block-course-highlighter\">Discover the various<a href=\"https:\/\/www.mygreatlearning.com\/blog\/machine-learning-models\/\"> <strong>Machine Learning Models<\/strong><\/a> and their role in predictions, classifications, and data-driven decision-making across industries.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"support-vector-machine-example-solving-a-classification-problem\"><strong>Support Vector Machine Example: Solving a Classification Problem<\/strong><\/h2>\n\n\n\n<p><strong>Problem Statement:<\/strong><\/p>\n\n\n\n<p>A company wants to classify emails as spam or not spam based on features such as word frequency and message length.<\/p>\n\n\n\n<p><strong>Implementation:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.svm import SVC\nfrom sklearn.metrics import accuracy_score, classification_report\n\n# Sample dataset (emails &amp;amp; labels: 1 for spam, 0 for not spam)\nemails = &#x5B;&quot;Win a lottery now&quot;, &quot;Meeting scheduled for tomorrow&quot;, &quot;Get discount on medicines&quot;, \n          &quot;Your bank account is updated&quot;, &quot;Urgent: Update your password&quot;]\nlabels = &#x5B;1, 0, 1, 0, 1]  # Spam = 1, Not Spam = 0\n\n# Convert text data into numerical form using TF-IDF Vectorizer\nvectorizer = TfidfVectorizer()\nX = vectorizer.fit_transform(emails)\n\n# Splitting dataset into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(X, labels, test_size=0.2, random_state=42)\n\n# Train the SVM model\nsvm_model = SVC(kernel=&#039;linear&#039;, C=1.0)\nsvm_model.fit(X_train, y_train)\n\n# Make predictions\ny_pred = svm_model.predict(X_test)\n\n# Evaluate performance\naccuracy = accuracy_score(y_test, y_pred)\nreport = classification_report(y_test, y_pred)\n\nprint(&quot;Model Accuracy:&quot;, accuracy)\nprint(&quot;Classification Report:\\n&quot;, report)\n<\/pre><\/div>\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nModel Accuracy: 1.0\nClassification Report:\n              precision    recall  f1-score   support\n           0       1.00      1.00      1.00         1\n           1       1.00      1.00      1.00         1\n<\/pre><\/div>\n\n\n<p class=\"block-course-highlighter\">Discover the most popular<a href=\"https:\/\/www.mygreatlearning.com\/blog\/machine-learning-algorithms\/\"> <strong>Machine Learning Algorithms<\/strong><\/a> and how they drive predictions, automation, and decision-making across industries.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>SVM is a powerful algorithm for classification and regression tasks, offering robust performance in high-dimensional spaces.<\/p>\n\n\n\n<p>Whether you are analyzing text, images, or financial data, SVM provides a reliable way to distinguish between different categories efficiently. Mastering <strong>types of SVM<\/strong>, the <strong>SVM classifier<\/strong>, and kernel functions will help you build better <a href=\"https:\/\/www.mygreatlearning.com\/blog\/machine-learning-models\/\">machine-learning models<\/a>.<\/p>\n\n\n\n<p class=\"block-course-highlighter\">Explore a variety of<a href=\"https:\/\/www.mygreatlearning.com\/machine-learning\/free-courses\"> <strong>Free Machine Learning Courses<\/strong><\/a> to build essential skills in ML, from basic concepts to advanced techniques.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"frequently-asked-questions\"><strong>Frequently Asked Questions<\/strong><\/h2>\n\n\n\n<p><strong>1. How is SVM different from logistic regression?<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.mygreatlearning.com\/blog\/logistic-regression-with-examples-in-python-and-r\/\">Logistic regression<\/a> predicts probabilities and optimizes based on likelihood, whereas SVM finds the maximum margin between classes and focuses on support vectors.<\/p>\n\n\n\n<p><strong>2. Can SVM be used for multi-class classification?<\/strong><\/p>\n\n\n\n<p>Yes, using the <strong>One-vs-One (OvO)<\/strong> or <strong>One-vs-All (OvA)<\/strong> approach, SVM can handle multi-class problems by training multiple binary classifiers.<\/p>\n\n\n\n<p><strong>3. What are the disadvantages of SVM?<\/strong><\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-full zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-disadvantages.webp\"><img decoding=\"async\" width=\"938\" height=\"446\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-disadvantages.webp\" alt=\"disadvantages of SVM\" class=\"wp-image-105700\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-disadvantages.webp 938w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-disadvantages-300x143.webp 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-disadvantages-768x365.webp 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/svm-disadvantages-150x71.webp 150w\" sizes=\"(max-width: 938px) 100vw, 938px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SVM is <strong>computationally expensive<\/strong> for large datasets.<\/li>\n\n\n\n<li>Choosing the right <strong>kernel function<\/strong> requires expertise.<\/li>\n\n\n\n<li>It does not work well when classes are heavily <strong>overlapping<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p><strong>4. How do I tune hyperparameters in SVM?<\/strong><\/p>\n\n\n\n<p>The two most important hyperparameters to tune are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C (Regularization parameter) - Controls trade-off between maximizing margin and minimizing misclassification.<\/li>\n\n\n\n<li>gamma (For RBF kernel) - Controls how far the influence of a training point reaches.<\/li>\n<\/ul>\n\n\n\n<p><strong>5. When should I use SVM instead of deep learning?<\/strong><\/p>\n\n\n\n<p>Use <strong>SVM when the dataset is small or medium-sized with well-defined features<\/strong>. <a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-deep-learning\/\">Deep learning<\/a> is better for large datasets with complex patterns.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Support Vector Machine (SVM) is a supervised learning algorithm used for classification and regression. It finds the optimal boundary to separate classes, ensuring maximum margin. This article explores SVM's working, mathematical foundation, types, real-world applications, and implementation with examples.<\/p>\n","protected":false},"author":41,"featured_media":105701,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[36799],"content_type":[],"class_list":["post-13469","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence","tag-machine-learning"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Support Vector Machine (SVM) Algorithm<\/title>\n<meta name=\"description\" content=\"Learn about Support Vector Machine (SVM), its types, working principles, mathematical foundation, and real-world applications in classification and regression tasks.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Support Vector Machine (SVM) Algorithm\" \/>\n<meta property=\"og:description\" content=\"Learn about Support Vector Machine (SVM), its types, working principles, mathematical foundation, and real-world applications in classification and regression tasks.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-25T12:29:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-18T07:15:27+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"761\" \/>\n\t<meta property=\"og:image:height\" content=\"382\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Support Vector Machine (SVM) Algorithm\",\"datePublished\":\"2020-03-25T12:29:52+00:00\",\"dateModified\":\"2025-03-18T07:15:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/\"},\"wordCount\":1077,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/support-vector-maahcine-banner.png\",\"keywords\":[\"Machine Learning\"],\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/\",\"name\":\"Support Vector Machine (SVM) Algorithm\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/support-vector-maahcine-banner.png\",\"datePublished\":\"2020-03-25T12:29:52+00:00\",\"dateModified\":\"2025-03-18T07:15:27+00:00\",\"description\":\"Learn about Support Vector Machine (SVM), its types, working principles, mathematical foundation, and real-world applications in classification and regression tasks.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/support-vector-maahcine-banner.png\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/support-vector-maahcine-banner.png\",\"width\":761,\"height\":382,\"caption\":\"Support Vector Machines\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/introduction-to-support-vector-machine\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Support Vector Machine (SVM) Algorithm\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Support Vector Machine (SVM) Algorithm","description":"Learn about Support Vector Machine (SVM), its types, working principles, mathematical foundation, and real-world applications in classification and regression tasks.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/","og_locale":"en_US","og_type":"article","og_title":"Support Vector Machine (SVM) Algorithm","og_description":"Learn about Support Vector Machine (SVM), its types, working principles, mathematical foundation, and real-world applications in classification and regression tasks.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2020-03-25T12:29:52+00:00","article_modified_time":"2025-03-18T07:15:27+00:00","og_image":[{"width":761,"height":382,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png","type":"image\/png"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Support Vector Machine (SVM) Algorithm","datePublished":"2020-03-25T12:29:52+00:00","dateModified":"2025-03-18T07:15:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/"},"wordCount":1077,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png","keywords":["Machine Learning"],"articleSection":["AI and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/","url":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/","name":"Support Vector Machine (SVM) Algorithm","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png","datePublished":"2020-03-25T12:29:52+00:00","dateModified":"2025-03-18T07:15:27+00:00","description":"Learn about Support Vector Machine (SVM), its types, working principles, mathematical foundation, and real-world applications in classification and regression tasks.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png","width":761,"height":382,"caption":"Support Vector Machines"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-support-vector-machine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"Support Vector Machine (SVM) Algorithm"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png",761,382,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner-150x150.png",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner-300x151.png",300,151,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png",761,382,false],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png",761,382,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png",761,382,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner.png",761,382,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner-640x382.png",640,382,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner-96x96.png",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/support-vector-maahcine-banner-150x75.png",150,75,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"Support Vector Machine (SVM) is a supervised learning algorithm used for classification and regression. It finds the optimal boundary to separate classes, ensuring maximum margin. This article explores SVM's working, mathematical foundation, types, real-world applications, and implementation with examples.","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/13469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=13469"}],"version-history":[{"count":14,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/13469\/revisions"}],"predecessor-version":[{"id":105719,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/13469\/revisions\/105719"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/105701"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=13469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=13469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=13469"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=13469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}