Social Network Ads project with linera & polynomial kernel | Support Vector Machine | MATLAB

  Рет қаралды 536

Knowledge Amplifier

Knowledge Amplifier

Күн бұрын

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;
classification_model=fitcsvm(data,'Purchased~Age+EstimatedSalary','KernelFunction','linear');
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('SVM Classification Visualization using linear kernel');
figure;
classification_model=fitcsvm(data,'Purchased~Age+EstimatedSalary','KernelFunction','polynomial','PolynomialOrder',5);
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('SVM Classification Visualization with polynomial kernel');
Learn Machine Learning using MATLAB:
• Importing Dataset | MA...
#MachineLearning #MATLAB

Пікірлер
Machine Learning Tutorial Python - 10  Support Vector Machine (SVM)
23:22
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 262 #shorts
00:20
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 120 МЛН
Intelligent Text Classification using Snowflake Cortex LLM
14:41
Knowledge Amplifier
Рет қаралды 337
ML Was Hard Until I Learned These 5 Secrets!
13:11
Boris Meinardus
Рет қаралды 327 М.
K-Means Clustering Algorithm with Python Tutorial
19:20
Andy McDonald
Рет қаралды 106 М.
Support Vector Machines Part 1 (of 3): Main Ideas!!!
20:32
StatQuest with Josh Starmer
Рет қаралды 1,3 МЛН
Support Vector Machines (SVM) - the basics | simply explained
28:44
I reverse engineered Next to find what they are hiding
29:48
Theo - t3․gg
Рет қаралды 6 М.
How I’d learn ML in 2024 (if I could start over)
7:05
Boris Meinardus
Рет қаралды 1,2 МЛН
Leveraging SVM for Text Classification
5:10
The Learning Channel of Quantitative Sciences
Рет қаралды 221
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36