Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to...

19
Introduction to Machine Learning Using Python Vikram Kamath

Transcript of Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to...

Page 1: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Introduction to Machine Learning Using Python

Vikram Kamath

Page 2: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Contents:

1. Introduction/Definition2. Where and Why ML is used3. Types of Learning4. Supervised Learning – Gradient Descent & Linear Regression5. Code Example6. Unsupervised Learning – Clustering and K-Means7. Code Example8. Neural Networks 9. Code Example10. Introduction to Scikit-Learn

Page 3: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Definition:

A computer program is said to 'learn' from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E

Page 4: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Classification: Digit RecognitionExample:

Input ( ) : Image Features

Output (Y): Class Labels { }

X iX iX i

y0 , y1 , . y9 Features( ): Proportion of pixels in Each of the 12 cells

X i

X iwhere i=1,2,. .. ,12

Page 5: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Handcrafted Rules will result in a large number of rules and exceptions

- We need ML in cases where we cannot directly write a program to handle every case

So it's better to have a machine that learnslearns from a large training set

So, according to the definition earlier:

Task (T): recognizing and classifying handwritten words within imagesPerformance measure (P): percent of words correctly classifiedTraining experience (E): a database of handwritten words with given classifications

Page 6: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Speech RecognitionWhen humans are unable to explain their expertise

Page 7: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Where ML is used...

Page 8: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect
Page 9: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect
Page 10: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect
Page 11: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect
Page 12: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Major Classes of Learning Algorithms:

Learning Learning AlgorithmsAlgorithms

Supervised Learning

Unsupervised Learning

Reinforcement Learning

Page 13: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Supervised Learning:

Page 14: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect
Page 15: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Unsupervised Learning:

Page 16: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect
Page 17: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Reinforcement Learning:

Page 18: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect
Page 19: Introduction to Machine Learning Using Python - PyCon India · PDF fileIntroduction to Scikit-Learn. Definition: A computer program is said to 'learn' from experience E with respect

Good Robot Bad RobotGood Robot Bad Robot