ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Machine Learning workshop by GDSC Amity University Chhattisgarh
Machine Learning workshop by GDSC Amity University Chhattisgarh
Clustering Strategies
? K-means
¨C Iteratively re-assign points to the nearest cluster
center
? Agglomerative clustering
¨C Start with each point as its own cluster and iteratively
merge the closest clusters
? Mean-shift clustering
¨C Estimate modes of pdf
? Spectral clustering
¨C Split the nodes in a graph based on assigned links with
similarity weights
As we go down this chart, the clustering strategies
have more tendency to transitively group points
even if they are not nearby in feature space
Machine Learning workshop by GDSC Amity University Chhattisgarh
The machine learning framework
? Apply a prediction function to a feature representation of
the image to get the desired output:
f( ) = ¡°apple¡±
f( ) = ¡°tomato¡±
f( ) = ¡°cow¡±
ºÝºÝߣ credit: L. Lazebnik
Machine Learning workshop by GDSC Amity University Chhattisgarh
Prediction
Steps
Training
Labels
Training
Images
Training
Training
Image
Features
Image
Features
Testing
Test Image
Learned
model
Learned
model
ºÝºÝߣ credit: D. Hoiem and L. Lazebnik
Features
? Raw pixels
? Histograms
? GIST descriptors
? ¡­ ºÝºÝߣ credit: L. Lazebnik
Classifiers: Nearest neighbor
f(x) = label of the training example nearest to x
? All we need is a distance function for our inputs
? No training required!
Test
example
Training
examples
from class 1
Training
examples
from class 2
ºÝºÝߣ credit: L. Lazebnik
Classifiers: Linear
? Find a linear function to separate the classes:
f(x) = sgn(w ? x + b)
ºÝºÝߣ credit: L. Lazebnik
? Images in the training set must be annotated with the
¡°correct answer¡± that the model is expected to produce
Contains a motorbike
Recognition task and supervision
ºÝºÝߣ credit: L. Lazebnik
Unsupervised ¡°Weakly¡± supervised Fully supervised
Definition depends on task
ºÝºÝߣ credit: L. Lazebnik
Generalization
? How well does a learned model generalize from
the data it was trained on to a new test set?
Training set (labels known) Test set (labels
unknown)
ºÝºÝߣ credit: L. Lazebnik
Machine Learning workshop by GDSC Amity University Chhattisgarh
Bias-Variance Trade-off
? Models with too few
parameters are
inaccurate because of a
large bias (not enough
flexibility).
? Models with too many
parameters are
inaccurate because of a
large variance (too much
sensitivity to the sample).
ºÝºÝߣ credit: D. Hoiem
Machine Learning workshop by GDSC Amity University Chhattisgarh
Generative vs. Discriminative Classifiers
Generative Models
Represent both the data and
the labels
Often, makes use of
conditional independence
and priors
Examples
? Na?ve Bayes classifier
? Bayesian network
Models of data may apply to
future prediction problems
Discriminative Models
? Learn to directly predict the
labels from the data
? Often, assume a simple
boundary (e.g., linear)
? Examples
¨C Logistic regression
¨C SVM
¨C Boosted decision trees
? Often easier to predict a
label from the data than to
model the data
ºÝºÝߣ credit: D. Hoiem
Machine Learning workshop by GDSC Amity University Chhattisgarh
Classification
Assign input vector to one of two or more classes
Any decision rule divides input space into decision
regions separated by decision boundaries
ºÝºÝߣ credit: L. Lazebnik
K-nearest neighbor
x x
x
x
x
x
x
x
o
o
o
o
o
o
o
x2
x1
+
+
1-nearest neighbor
x x
x
x
x
x
x
x
o
o
o
o
o
o
o
x2
x1
+
+
3-nearest neighbor
x x
x
x
x
x
x
x
o
o
o
o
o
o
o
x2
x1
+
+
5-nearest neighbor
x x
x
x
x
x
x
x
o
o
o
o
o
o
o
x2
x1
+
+
Classifiers: Linear SVM
x x
x
x
x
x
x
x
o
o
o
o
o
x2
x1
? Find a linear function to separate the classes:
f(x) = sgn(w ? x + b)
Classifiers: Linear SVM
x x
x
x
x
x
x
x
o
o
o
o
o
x2
x1
? Find a linear function to separate the classes:
f(x) = sgn(w ? x + b)
Classifiers: Linear SVM
x x
x
x
x
x
x
x
o
o
o
o
o
o
x2
x1
? Find a linear function to separate the classes:
f(x) = sgn(w ? x + b)
? Datasets that are linearly separable work out great:
? But what if the dataset is just too hard?
? We can map it to a higher-dimensional space:
0 x
0 x
0 x
x2
Nonlinear SVMs
ºÝºÝߣ credit: Andrew Moore
¦µ: x ¡ú ¦Õ(x)
Nonlinear SVMs
? General idea: the original input space can
always be mapped to some higher-dimensional
feature space where the training set is
separable:
ºÝºÝߣ credit: Andrew Moore
Nonlinear SVMs
b
K
y
b
y
i
i
i
i
i
i
i
i ?
?
?
? ?
? )
,
(
)
(
)
( x
x
x
x ?
?
?
?
? The kernel trick: instead of explicitly computing
the lifting transformation ¦Õ(x), define a kernel
function K such that
K(xi,xj) = ¦Õ(xi ) ¡¤ ¦Õ(xj)
(to be valid, the kernel function must satisfy
Mercer¡¯s condition)
? This gives a nonlinear decision boundary in the
original feature space:
C. Burges, A Tutorial on Support Vector Machines for Pattern Recognition, Data Mining
and Knowledge Discovery, 1998
Nonlinear kernel: Example
? Consider the mapping )
,
(
)
( 2
x
x
x ?
?
2
2
2
2
2
2
)
,
(
)
,
(
)
,
(
)
(
)
(
y
x
xy
y
x
K
y
x
xy
y
y
x
x
y
x
?
?
?
?
?
?
??
?
x2
Kernels for bags of features
?
?
?
N
i
i
h
i
h
h
h
I
1
2
1
2
1 ))
(
),
(
min(
)
,
(
? Histogram intersection kernel:
? Generalized Gaussian kernel:
? D can be (inverse) L1 distance, Euclidean distance, ¦Ö2
distance, etc.
?
?
?
?
?
?
?
? 2
2
1
2
1 )
,
(
1
exp
)
,
( h
h
D
A
h
h
K
J. Zhang, M. Marszalek, S. Lazebnik, and C. Schmid, Local Features and Kernels for
Classifcation of Texture and Object Categories: A Comprehensive Study, IJCV 2007
Summary: SVMs for image classification
1. Pick an image representation (in our case, bag
of features)
2. Pick a kernel function for that representation
3. Compute the matrix of kernel values between
every pair of training examples
4. Feed the kernel matrix into your favorite SVM
solver to obtain support vectors and weights
5. At test time: compute kernel values for your test
example and each support vector, and combine
them with the learned weights to get the value of
the decision function
ºÝºÝߣ credit: L. Lazebnik
What about multi-class SVMs?
? Unfortunately, there is no ¡°definitive¡± multi-class SVM
formulation
? In practice, we have to obtain a multi-class SVM by combining
multiple two-class SVMs
? One vs. others
? Traning: learn an SVM for each class vs. the others
? Testing: apply each SVM to test example and assign to it the class of the SVM that
returns the highest decision value
? One vs. one
? Training: learn an SVM for each pair of classes
? Testing: each learned SVM ¡°votes¡± for a class to assign to the test example
ºÝºÝߣ credit: L. Lazebnik
SVMs: Pros and cons
? Pros
? Many publicly available SVM packages:
http://www.kernel-machines.org/software
? Kernel-based framework is very powerful, flexible
? SVMs work very well in practice, even with very small
training sample sizes
? Cons
? No ¡°direct¡± multi-class SVM, must combine two-class SVMs
? Computation, memory
¨C During training time, must compute matrix of kernel values for
every pair of examples
¨C Learning can take a very long time for large-scale problems
Machine Learning workshop by GDSC Amity University Chhattisgarh
What to remember about classifiers
No free lunch: machine learning algorithms are tools, not
dogmas
Try simple classifiers first
Better to have smart features and simple classifiers than simple
features and smart classifiers
Use increasingly powerful classifiers with more training data
(bias-variance tradeoff)
ºÝºÝߣ credit: D. Hoiem
Some Machine Learning References
General
? Tom Mitchell, Machine Learning, McGraw Hill, 1997
? Christopher Bishop, Neural Networks for Pattern Recognition, Oxford
University Press, 1995
Adaboost
? Friedman, Hastie, and Tibshirani, ¡°Additive logistic regression: a
statistical view of boosting¡±, Annals of Statistics, 2000
SVMs
? http://www.support-vector.net/icml-tutorial.pdf
ºÝºÝߣ credit: D. Hoiem
Machine Learning workshop by GDSC Amity University Chhattisgarh

More Related Content

Similar to Machine Learning workshop by GDSC Amity University Chhattisgarh (20)

DeepLearningLecture.pptx
DeepLearningLecture.pptxDeepLearningLecture.pptx
DeepLearningLecture.pptx
ssuserf07225
?
SVM
SVMSVM
SVM
Mohit Shrivastava
?
lecture_3_3.pptx Classification and pred
lecture_3_3.pptx Classification and predlecture_3_3.pptx Classification and pred
lecture_3_3.pptx Classification and pred
SHADRACKSSENKAAYI
?
Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...
Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...
Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...
Universitat Polit¨¨cnica de Catalunya
?
lecture_16.pptx
lecture_16.pptxlecture_16.pptx
lecture_16.pptx
ObaidUllah693733
?
background.pptx
background.pptxbackground.pptx
background.pptx
KabileshCm
?
Machine Learning Deep Learning Deep Learning
Machine Learning Deep Learning Deep LearningMachine Learning Deep Learning Deep Learning
Machine Learning Deep Learning Deep Learning
ssuserd89c50
?
Machine learning interviews day2
Machine learning interviews   day2Machine learning interviews   day2
Machine learning interviews day2
rajmohanc
?
lecture_3_2.pptx, Classification and prediction
lecture_3_2.pptx, Classification and predictionlecture_3_2.pptx, Classification and prediction
lecture_3_2.pptx, Classification and prediction
SHADRACKSSENKAAYI
?
Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...
Dalei Li
?
Deep learning from mashine learning AI..
Deep learning from mashine learning AI..Deep learning from mashine learning AI..
Deep learning from mashine learning AI..
premkumarlive
?
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional Managers
Albert Y. C. Chen
?
Text categorization
Text categorizationText categorization
Text categorization
Phuong Nguyen
?
Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...
Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...
Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...
Association for Computational Linguistics
?
KNN
KNNKNN
KNN
Joris Schelfaut
?
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
AmAn Singh
?
Machine Learning
Machine LearningMachine Learning
Machine Learning
Girish Khanzode
?
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle Competitions
Mark Peng
?
17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx
ssuser2023c6
?
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
TheULTIMATEALLROUNDE
?
DeepLearningLecture.pptx
DeepLearningLecture.pptxDeepLearningLecture.pptx
DeepLearningLecture.pptx
ssuserf07225
?
lecture_3_3.pptx Classification and pred
lecture_3_3.pptx Classification and predlecture_3_3.pptx Classification and pred
lecture_3_3.pptx Classification and pred
SHADRACKSSENKAAYI
?
Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...
Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...
Optimization for Neural Network Training - Veronica Vilaplana - UPC Barcelona...
Universitat Polit¨¨cnica de Catalunya
?
Machine Learning Deep Learning Deep Learning
Machine Learning Deep Learning Deep LearningMachine Learning Deep Learning Deep Learning
Machine Learning Deep Learning Deep Learning
ssuserd89c50
?
Machine learning interviews day2
Machine learning interviews   day2Machine learning interviews   day2
Machine learning interviews day2
rajmohanc
?
lecture_3_2.pptx, Classification and prediction
lecture_3_2.pptx, Classification and predictionlecture_3_2.pptx, Classification and prediction
lecture_3_2.pptx, Classification and prediction
SHADRACKSSENKAAYI
?
Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...
Dalei Li
?
Deep learning from mashine learning AI..
Deep learning from mashine learning AI..Deep learning from mashine learning AI..
Deep learning from mashine learning AI..
premkumarlive
?
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional Managers
Albert Y. C. Chen
?
Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...
Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...
Chris Dyer - 2017 - Neural MT Workshop Invited Talk: The Neural Noisy Channel...
Association for Computational Linguistics
?
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
AmAn Singh
?
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle Competitions
Mark Peng
?
17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx
ssuser2023c6
?

Recently uploaded (20)

DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
?
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
?
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
?
Deno ...................................
Deno ...................................Deno ...................................
Deno ...................................
Robert MacLean
?
Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
?
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptxUnderstanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
shyamraj55
?
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
maharajput103
?
Unlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤EUnlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤E
Expeed Software
?
What Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI AgentsWhat Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI Agents
Zilliz
?
Future-Proof Your Career with AI Options
Future-Proof Your  Career with AI OptionsFuture-Proof Your  Career with AI Options
Future-Proof Your Career with AI Options
DianaGray10
?
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
?
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & TipsTrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc
?
UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2
DianaGray10
?
FinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptxFinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptx
Tracxn
?
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
?
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
?
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
?
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
?
Deno ...................................
Deno ...................................Deno ...................................
Deno ...................................
Robert MacLean
?
Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
?
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptxUnderstanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
shyamraj55
?
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
maharajput103
?
Unlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤EUnlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤E
Expeed Software
?
What Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI AgentsWhat Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI Agents
Zilliz
?
Future-Proof Your Career with AI Options
Future-Proof Your  Career with AI OptionsFuture-Proof Your  Career with AI Options
Future-Proof Your Career with AI Options
DianaGray10
?
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
?
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & TipsTrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc
?
UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2
DianaGray10
?
FinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptxFinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptx
Tracxn
?
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
?

Machine Learning workshop by GDSC Amity University Chhattisgarh

  • 3. Clustering Strategies ? K-means ¨C Iteratively re-assign points to the nearest cluster center ? Agglomerative clustering ¨C Start with each point as its own cluster and iteratively merge the closest clusters ? Mean-shift clustering ¨C Estimate modes of pdf ? Spectral clustering ¨C Split the nodes in a graph based on assigned links with similarity weights As we go down this chart, the clustering strategies have more tendency to transitively group points even if they are not nearby in feature space
  • 5. The machine learning framework ? Apply a prediction function to a feature representation of the image to get the desired output: f( ) = ¡°apple¡± f( ) = ¡°tomato¡± f( ) = ¡°cow¡± ºÝºÝߣ credit: L. Lazebnik
  • 8. Features ? Raw pixels ? Histograms ? GIST descriptors ? ¡­ ºÝºÝߣ credit: L. Lazebnik
  • 9. Classifiers: Nearest neighbor f(x) = label of the training example nearest to x ? All we need is a distance function for our inputs ? No training required! Test example Training examples from class 1 Training examples from class 2 ºÝºÝߣ credit: L. Lazebnik
  • 10. Classifiers: Linear ? Find a linear function to separate the classes: f(x) = sgn(w ? x + b) ºÝºÝߣ credit: L. Lazebnik
  • 11. ? Images in the training set must be annotated with the ¡°correct answer¡± that the model is expected to produce Contains a motorbike Recognition task and supervision ºÝºÝߣ credit: L. Lazebnik
  • 12. Unsupervised ¡°Weakly¡± supervised Fully supervised Definition depends on task ºÝºÝߣ credit: L. Lazebnik
  • 13. Generalization ? How well does a learned model generalize from the data it was trained on to a new test set? Training set (labels known) Test set (labels unknown) ºÝºÝߣ credit: L. Lazebnik
  • 15. Bias-Variance Trade-off ? Models with too few parameters are inaccurate because of a large bias (not enough flexibility). ? Models with too many parameters are inaccurate because of a large variance (too much sensitivity to the sample). ºÝºÝߣ credit: D. Hoiem
  • 17. Generative vs. Discriminative Classifiers Generative Models Represent both the data and the labels Often, makes use of conditional independence and priors Examples ? Na?ve Bayes classifier ? Bayesian network Models of data may apply to future prediction problems Discriminative Models ? Learn to directly predict the labels from the data ? Often, assume a simple boundary (e.g., linear) ? Examples ¨C Logistic regression ¨C SVM ¨C Boosted decision trees ? Often easier to predict a label from the data than to model the data ºÝºÝߣ credit: D. Hoiem
  • 19. Classification Assign input vector to one of two or more classes Any decision rule divides input space into decision regions separated by decision boundaries ºÝºÝߣ credit: L. Lazebnik
  • 24. Classifiers: Linear SVM x x x x x x x x o o o o o x2 x1 ? Find a linear function to separate the classes: f(x) = sgn(w ? x + b)
  • 25. Classifiers: Linear SVM x x x x x x x x o o o o o x2 x1 ? Find a linear function to separate the classes: f(x) = sgn(w ? x + b)
  • 26. Classifiers: Linear SVM x x x x x x x x o o o o o o x2 x1 ? Find a linear function to separate the classes: f(x) = sgn(w ? x + b)
  • 27. ? Datasets that are linearly separable work out great: ? But what if the dataset is just too hard? ? We can map it to a higher-dimensional space: 0 x 0 x 0 x x2 Nonlinear SVMs ºÝºÝߣ credit: Andrew Moore
  • 28. ¦µ: x ¡ú ¦Õ(x) Nonlinear SVMs ? General idea: the original input space can always be mapped to some higher-dimensional feature space where the training set is separable: ºÝºÝߣ credit: Andrew Moore
  • 29. Nonlinear SVMs b K y b y i i i i i i i i ? ? ? ? ? ? ) , ( ) ( ) ( x x x x ? ? ? ? ? The kernel trick: instead of explicitly computing the lifting transformation ¦Õ(x), define a kernel function K such that K(xi,xj) = ¦Õ(xi ) ¡¤ ¦Õ(xj) (to be valid, the kernel function must satisfy Mercer¡¯s condition) ? This gives a nonlinear decision boundary in the original feature space: C. Burges, A Tutorial on Support Vector Machines for Pattern Recognition, Data Mining and Knowledge Discovery, 1998
  • 30. Nonlinear kernel: Example ? Consider the mapping ) , ( ) ( 2 x x x ? ? 2 2 2 2 2 2 ) , ( ) , ( ) , ( ) ( ) ( y x xy y x K y x xy y y x x y x ? ? ? ? ? ? ?? ? x2
  • 31. Kernels for bags of features ? ? ? N i i h i h h h I 1 2 1 2 1 )) ( ), ( min( ) , ( ? Histogram intersection kernel: ? Generalized Gaussian kernel: ? D can be (inverse) L1 distance, Euclidean distance, ¦Ö2 distance, etc. ? ? ? ? ? ? ? ? 2 2 1 2 1 ) , ( 1 exp ) , ( h h D A h h K J. Zhang, M. Marszalek, S. Lazebnik, and C. Schmid, Local Features and Kernels for Classifcation of Texture and Object Categories: A Comprehensive Study, IJCV 2007
  • 32. Summary: SVMs for image classification 1. Pick an image representation (in our case, bag of features) 2. Pick a kernel function for that representation 3. Compute the matrix of kernel values between every pair of training examples 4. Feed the kernel matrix into your favorite SVM solver to obtain support vectors and weights 5. At test time: compute kernel values for your test example and each support vector, and combine them with the learned weights to get the value of the decision function ºÝºÝߣ credit: L. Lazebnik
  • 33. What about multi-class SVMs? ? Unfortunately, there is no ¡°definitive¡± multi-class SVM formulation ? In practice, we have to obtain a multi-class SVM by combining multiple two-class SVMs ? One vs. others ? Traning: learn an SVM for each class vs. the others ? Testing: apply each SVM to test example and assign to it the class of the SVM that returns the highest decision value ? One vs. one ? Training: learn an SVM for each pair of classes ? Testing: each learned SVM ¡°votes¡± for a class to assign to the test example ºÝºÝߣ credit: L. Lazebnik
  • 34. SVMs: Pros and cons ? Pros ? Many publicly available SVM packages: http://www.kernel-machines.org/software ? Kernel-based framework is very powerful, flexible ? SVMs work very well in practice, even with very small training sample sizes ? Cons ? No ¡°direct¡± multi-class SVM, must combine two-class SVMs ? Computation, memory ¨C During training time, must compute matrix of kernel values for every pair of examples ¨C Learning can take a very long time for large-scale problems
  • 36. What to remember about classifiers No free lunch: machine learning algorithms are tools, not dogmas Try simple classifiers first Better to have smart features and simple classifiers than simple features and smart classifiers Use increasingly powerful classifiers with more training data (bias-variance tradeoff) ºÝºÝߣ credit: D. Hoiem
  • 37. Some Machine Learning References General ? Tom Mitchell, Machine Learning, McGraw Hill, 1997 ? Christopher Bishop, Neural Networks for Pattern Recognition, Oxford University Press, 1995 Adaboost ? Friedman, Hastie, and Tibshirani, ¡°Additive logistic regression: a statistical view of boosting¡±, Annals of Statistics, 2000 SVMs ? http://www.support-vector.net/icml-tutorial.pdf ºÝºÝߣ credit: D. Hoiem