Slide 1

Slide 1 text

INTRODUCTION TO Support vector machines USING PYTHON USING THOR‘s HAMMER Miguel Cabrera @mfcabrera http://mfcabrera.com

Slide 2

Slide 2 text

OVERVIEW Tools Intro to Machine Learning Intuition behind SVM Basic usage Some situations Examples

Slide 3

Slide 3 text

TOOLS Every hero needs weapons

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

•  Powerful interactive shells (terminal and Qt-based). •  A browser-based notebook with support for code, text, mathematical expressions, inline plots and other rich media. •  Support for interactive data visualization and use of GUI toolkits. •  Flexible, embeddable interpreters to load into your own projects. •  Easy to use, high performance tools for parallel computing. From http://ipython.org :

Slide 7

Slide 7 text

Machine LEARNING

Slide 8

Slide 8 text

Machine Learning Supervised Classification Regression Unsupervised Clustering Feature Learning Reinforcement Learning, Recommender Systems, etc. No reason for Natalie Portman to be

Slide 9

Slide 9 text

Supervised x1 x2

Slide 10

Slide 10 text

UNSUPERVISED x1 x2

Slide 11

Slide 11 text

labels labels Supervised Training Tex, Documents, Imgages Training Tex, Documents, Imgages Training Tex, Documents, Imgages, Sounds labels Machine Learning Algorithm Predictive Model Features Vectors New Text Document, Images, Sounds Feature Vector Expected Label Adapted from: https://speakerdeck.com/ogrisel/machine-learning-in-python-with-scikit-learn

Slide 12

Slide 12 text

Applications Source: https://speakerdeck.com/ogrisel/trends-in-machine-learning-2

Slide 13

Slide 13 text

Spam Classification

Slide 14

Slide 14 text

TOPIC Classification

Slide 15

Slide 15 text

Sentiment analysis

Slide 16

Slide 16 text

OBJECT CLASSIFICATION

Slide 17

Slide 17 text

Support vector machines

Slide 18

Slide 18 text

Support vector machines? •  Effective in high dimensional spaces. •  Still effective in cases where number of dimensions is greater than the number of samples. •  Uses a subset of training points in the decision function (called support vectors), so it is also memory efficient. •  Easy to use and train •  Versatile: different kernel functions can be specified for the decision function.

Slide 19

Slide 19 text

WHEN?

Slide 20

Slide 20 text

Source: http://peekaboo-vision.blogspot.de/2013/01/machine-learning-cheat-sheet-for-scikit.html

Slide 21

Slide 21 text

THOR LIKES HIS HAMMER....

Slide 22

Slide 22 text

FOR THE FOLLOWING SECTIONS SEE THE IPYTHON NOTEBOOK FOUND AT: http://bit.ly/1g7VEfG

Slide 23

Slide 23 text

INTUITION BEHIND SVM

Slide 24

Slide 24 text

KERNELS

Slide 25

Slide 25 text

MULTICLASS

Slide 26

Slide 26 text

UNBALANCED DATA

Slide 27

Slide 27 text

TRAINING AND CROSS VALIDATIOn

Slide 28

Slide 28 text

Conclusion •  (I)Python / SciPy / Numpy / Scikit-Learn are awesome :D! •  SVM is mature algorithm, straightforward to use and works well in most of the cases. •  Being able to use Kernels allows SVM to learn complex decision boundaries. •  Using LibSVM / LibLinear based libraries allow for reusing models across languages or at least prototyping in Python.

Slide 29

Slide 29 text

QUESTIONS?

Slide 30

Slide 30 text

THANK YOU