Animation of the effect of the degree of a polynomial kernel in SVM Classification | MATLAB

  Рет қаралды 400

Knowledge Amplifier

Knowledge Amplifier

Күн бұрын

The polynomial kernel of degree 1 leads to a linear separation (A).
Higher-degree polynomial kernels allow a more flexible decision boundary (B,C).
You can explore more about polynomial kernel from the below link:
en.wikipedia.o...
Dataset & Problem Statement:
www.kaggle.com...
Code:
clc
clear all
close all
warning off
data=readtable('Social_Network_Ads.csv');
stand_age=(data.Age-mean(data.Age))/std(data.Age);
data.Age=stand_age;
stand_estimted_salary=(data.EstimatedSalary-mean(data.EstimatedSalary))/std(data.EstimatedSalary);
data.EstimatedSalary=stand_estimted_salary;
for i=1:15
classification_model=fitcsvm(data,'Purchased~Age+EstimatedSalary','KernelFunction','polynomial','PolynomialOrder',i);
e=min(data.Age):0.01:max(data.Age);
f=min(data.EstimatedSalary):0.01:max(data.EstimatedSalary);
[x1 x2]=meshgrid(e,f);
x=[x1(:) x2(:)];
ms=predict(classification_model,x);
gscatter(x1(:),x2(:),ms,'cym');
hold on;
gscatter(data.Age,data.EstimatedSalary,data.Purchased,'rgb','.',30);
title(i);
drawnow;
end
Learn Machine Learning with MATLAB:
• Importing Dataset | MA...
#MachineLearning #MATLAB

Пікірлер
SVM with Gaussian Kernel & Visualizing the Support Vectors | MATLAB
4:48
Knowledge Amplifier
Рет қаралды 2,6 М.
SVM Kernels : Data Science Concepts
12:02
ritvikmath
Рет қаралды 73 М.
Как не носить с собой вещи
00:31
Miracle
Рет қаралды 894 М.
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 16 МЛН
Flipping Robot vs Heavier And Heavier Objects
00:34
Mark Rober
Рет қаралды 59 МЛН
Leveraging SVM for Text Classification
5:10
The Learning Channel of Quantitative Sciences
Рет қаралды 221
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
Support Vector Machines Part 2: The Polynomial Kernel (Part 2 of 3)
7:15
StatQuest with Josh Starmer
Рет қаралды 344 М.
All Learning Algorithms Explained in 14 Minutes
14:10
CinemaGuess
Рет қаралды 259 М.
I reverse engineered Next to find what they are hiding
29:48
Theo - t3․gg
Рет қаралды 10 М.
Beginner Kaggle Data Science Project Walk-Through (Titanic)
38:16
Machine Learning Fundamentals: The Confusion Matrix
7:13
StatQuest with Josh Starmer
Рет қаралды 711 М.
Как не носить с собой вещи
00:31
Miracle
Рет қаралды 894 М.