Slide 1

Slide 1 text

MLCC Study Jam Rajkot Edition

Slide 2

Slide 2 text

I AM Pratik Parmar Hello! And I am here to bore you with Machine Learning.

Slide 3

Slide 3 text

Where to find course content? http://g.co/mledu/studyjams-IN

Slide 4

Slide 4 text

Google Colab

Slide 5

Slide 5 text

? What is Machine Learning actually?

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Logic Input Output

Slide 8

Slide 8 text

To minimize the difference between predicted output and actual output. Input Output Trained mathematical function

Slide 9

Slide 9 text

To minimize the difference between predicted output and actual output. Old Input Learn parameters of the function Trained mathematical function Old Output

Slide 10

Slide 10 text

What do experts say about ML / DS / AI ? ● “The sexy job in the next 10 years will be statisticians. People think I’m joking, but who would’ve guessed that computer engineers would’ve been the sexy job of the 1990s?” - Hal Varian( Chief economist, Google) ● “The world is one big data problem.” - Andrew McAfee(associate director of the Center for Digital Business at the MIT Sloan School of Management) ● “Data is the Next Intel Inside.” Tim O’Reilly ● “Data is the sword of the 21st century, those who wield it the samurai.” -Jonathan Rosenberg ● “A year spent in artificial intelligence is enough to make one believe in God.” -Alan Perlis ● “Data science can get you high without cannabis, drunk without alcohol and tripped up without the coke”- The Honorable Speaker

Slide 11

Slide 11 text

? Shocking IT NEWS last year?

Slide 12

Slide 12 text

Google Duplex?

Slide 13

Slide 13 text

OpenAI's 'Dota 2' bots taking on pro teams ?

Slide 14

Slide 14 text

Deep Fake ?

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Why is AI all the rage only NOW? ● More Data ● More Computing Power ● Cloud as the Platform ● Commoditization of Deep Learning (e.g. Tensorflow, PyTorch) ● Specialized hardware for Deep Learning ( CPUs <- GPUs <- TPUs ) ● Automation of ML (e.g. MIT’s Data Science Machine & Google’s AutoML)

Slide 17

Slide 17 text

Is Machine Learning for everyone?

Slide 18

Slide 18 text

Machine Learning is Already Affecting Your World

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Google Neural Machine Translation (Sep 2016)

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

? This is cool but how we can develop such applications?

Slide 25

Slide 25 text

Why do we don’t study Machine Learning ? ● Excuse 1: Algebra - Machine Learning is a lot about math and that’s where a lot of people give up. Not just algebra, calculus is also a demon for us! ● Excuse 2: Really tedious syllabus - A proper machine learning track can take three years; ranging from math and programming to specific applications and tools. A standard data science specialization takes almost three years. You maybe don’t want to do college again! ● Excuse 3: Openness to newcomer - Machine Learning has been traditionally thought as a field demanding excellent command over math and code. This is just a small rumor. Linear algebra waiting for you to start learning ML

Slide 26

Slide 26 text

Rule based programming VS Data driven learning

Slide 27

Slide 27 text

“ Machine learning is learning from example and experience. -Josh Gordon

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Classifie r Classifie r

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Machine Learning Frameworks

Slide 37

Slide 37 text

● TensorFlow™ is an open source library for numerical computation using data flow graphs. ● Python! (It’s just front end actually )

Slide 38

Slide 38 text

TensorFlow Mechanics feed data and run graph (operation) sess.run (op) update variables in the graph (and return values) Build graph using TensorFlow operations

Slide 39

Slide 39 text

Stuff except the real part ! ● Extracting data or in some cases, useful data from a source. E.g. Extracting the address of every person from a leaked Aadhar database ● Visualizing the data in form of graphs or charts E.g. Drawing a histogram to prove young adults live mostly nearby a party place ● Manipulating the data to achieve desired results E.g. Demanding the Corporation to build a party place for drawing more income from young adults

Slide 40

Slide 40 text

Give some space because...

Slide 41

Slide 41 text

Artificial Intelligence, Machine Learning and Deep Learning

Slide 42

Slide 42 text

Machine Learning is a Maze

Slide 43

Slide 43 text

Each one has a unique and different solution

Slide 44

Slide 44 text

Machine Learning in Python ● Raw Data collection ○ BeautifulSoup library ● Data Preprocessing and Cleanup ○ Pandas library ● Data Visualization ○ Matplotlib and Seaborn library ● ML Modeling ○ Tensorflow ● Deployment ○ Tensorflow Serving

Slide 45

Slide 45 text

What is (supervised) machine learning ? ML system learn how to combine input to produce useful predictions on never-before-seen data

Slide 46

Slide 46 text

Terminology: Labels ● Label is the true thing we’re predicting: y ○ The y variable in basic linear regression ○ The label could be the future price of wheat, the kind of animal shown in a picture, the meaning of an audio clip, or just about anything.

Slide 47

Slide 47 text

Terminology: Features ● A feature is an input variable—the x variable in simple linear regression. ○ A simple machine learning project might use a single feature, while a more sophisticated machine learning project could use millions of features, specified as: ○ The y variable in basic linear regression ○ The label could be the future price of wheat, the kind of animal shown in a picture, the meaning of an audio clip, or just about anything.

Slide 48

Slide 48 text

Terminology: Features ● In the spam detector example, the features could include the following: ○ words in the email text ○ sender's address ○ time of day the email was sent ○ email contains the phrase "one weird trick."

Slide 49

Slide 49 text

Terminology: Example, Labeled example and unlabeled data ● Example is a particular instance of data, x ● Labeled example, has {features, label} : (x, y) ○ Used to train the model ○ In our spam detector example, the labeled examples would be individual emails that users have explicitly marked as "spam" or "not spam." ● Unlabeled example has {features, ?} : (x, ?) ○ Used for making predictions on new data

Slide 50

Slide 50 text

Labeled Example

Slide 51

Slide 51 text

Unlabeled Example Once we've trained our model with labeled examples, we use that model to predict the label on unlabeled examples. In the spam detector, unlabeled examples are new emails that humans haven't yet labeled.

Slide 52

Slide 52 text

Models ● A model defines the relationship between features and label. ○ For example, a spam detection model might associate certain features strongly with "spam". ● Training : Creating or learning the model ○ That is, you show the model labeled examples and enable the model to gradually learn the relationships between features and label. ● Inference: Applying the trained model to unlabeled examples. ○ That is, you use the trained model to make useful predictions (y'). For example, during inference, you can predict medianHouseValue for new unlabeled examples or spam or not spam in spam detection

Slide 53

Slide 53 text

Regression

Slide 54

Slide 54 text

Regression ● Predicts continuous values. For example, ○ What is the value of a house in California? ○ What is the probability that a user will click on this ad?

Slide 55

Slide 55 text

Classification

Slide 56

Slide 56 text

Classification ● Predicts discrete value. For example, ○ Is a given email message spam or not spam? ○ Is this an image of a dog, a cat, or a hamster?

Slide 57

Slide 57 text

Classification vs Regression

Slide 58

Slide 58 text

Linear Regression

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

Linear Regression ● y is the temperature in Celsius—the value we're trying to predict. ● m is the slope of the line. ● x is the number of chirps per minute—the value of our input feature. ● b is the y-intercept.

Slide 62

Slide 62 text

By convention in machine learning, ● is the predicted label (a desired output). ● is the bias (the y-intercept), sometimes referred to as w0. ● is the weight of feature 1. Weight is the same concept as the "slope" m in the traditional equation of a line. ● is a feature (a known input).

Slide 63

Slide 63 text

For more sophisticated models might reply on multiple features

Slide 64

Slide 64 text

Loss

Slide 65

Slide 65 text

Learning Rate

Slide 66

Slide 66 text

Squared Loss = the square of the difference between the label and the prediction = (observation - prediction(x))2 = (y - y')2

Slide 67

Slide 67 text

Reducing the loss

Slide 68

Slide 68 text

Reducing the loss Exercise: http://tiny.cc/mlccloss

Slide 69

Slide 69 text

Training and Test Sets: Splitting Data

Slide 70

Slide 70 text

Time to implement Linear Regression

Slide 71

Slide 71 text

Neural Networks

Slide 72

Slide 72 text

Neural Networks

Slide 73

Slide 73 text

You can be this...

Slide 74

Slide 74 text

Need help? Call 100 ● Shoot us a mail ● Ask during weekly hangout ● Create issue on Tensorflow Github repo ● Machine Learning subreddit ● Tensorflow channel on Youtube

Slide 75

Slide 75 text

What’s next ● Machine Learning Courses ○ Shri Shri Shri Andrew Ng’s machine learning course- Say no more! https://www.coursera.org/learn/machine-learning ○ Deep Learning: https://www.udacity.com/course/deep-learning-nanodegree-foundati on--nd101 ○ Stanford’s Intro to TensorFlow Course: https://web.stanford.edu/class/cs20si/ ○ MIT’s Intro to Deep Learning Course: introtodeeplearning.com

Slide 76

Slide 76 text

What’s next ● Tensorflow ○ Visit the TensorFlow homepage to get started! https://www.tensorflow.org/ ○ Check out these talks from the TensorFlow Developer Summit: https://youtu.be/RUougpQ6cMo

Slide 77

Slide 77 text

What’s next ● Google Cloud ML ○ ML Engine - https://cloud.google.com/ml-engine/ ○ Machine Learning APIs (Image recognition, voice recognition, translation) - https://cloud.google.com/products/machine-learning/

Slide 78

Slide 78 text

NO QUESTIONS PLEASE

Slide 79

Slide 79 text

May the math be with you !