You are on page 1of 18

oyelecoupons.

com

LICENSE PLATE nature.com

RECOMMENDATION IDENTIFICATION PROTEIN FOLDING

Fortunately, not. There are some


My name is Melbo basic ML techniques with which
you can mix-n-match to solve
more complicated problems
Do I need to learn a different ML
माझे नाव Melbo आहे technique for each problem?
bachelornation.com chess.com

MACHINE TRANSLATION “CONTEST” WINNER GAME PLAY


ml primitives
after watching how many ml videos is it okay to update
the skills section in one’s LinkedIn profile ?? … just
asking for a friend …
A typical Machine Learning cycle TESTING
We get most popular ML primitives by looking at 3 things:
TEST DATA
1. What sort of action we wish to take on test data
2. In what form is training data available to us
3. What sort of model we learn and how we learn it
TRAINING

Code Code
ML Algorithm ML model
TRAINING DATA Written by a human ML expert Produced automatically by the ML algo

The ML way to solve an ill-understood task


ML primitives by type of action on test data
@ @
Subject: Tax Assessment Subject: New Post
Sender:
This is often called binary incometax.gov
classification Sender: reddit.com
@ @
since there are only two bins into which What if I want more than 2 bins?
Subject: every test data
Free movie point must be sent
tickets Subject: Friend Request
Sender: winfabulous.xyz Sender: facebook.com

STRESSED
SPAM HAPPY
NON-SPAM
ML primitives by type of action on test data
@ @
Subject: Tax Assessment Subject: New Post
Sender: incometax.gov Sender: reddit.com
This is often called multi- What if I want to send a point to more than one bin?
@ class classification @ What if I want to send a point to no bin?
Subject: Free movie tickets Subject: Friend Request
Sender: winfabulous.xyz Sender: facebook.com
ML primitives by type of action on test data
That is called zero-shot learning,
@ which we might discuss later!
This is often called multi-
Subject: Tax Assessment
Sender: incometax.gov label classification

@
Subject: Friend Request A data point maybe
Sender: facebook.com associated with zero or
more labels
@
Subject: Free movie tickets
Sender: winfabulous.xyz
What if I want to add more
@ classes or more labels later?
Subject: New Post
Sender: reddit.com

Money
Entertainment Work Friends Urgent Family
Matters
ML primitives by type of action on test data
This is often called regression
@ or real-valued regression to
Subject: Tax Assessment
Sender: incometax.gov 0.63
9.99 be more precise

ML is as much an art as a
@ science. Selecting the most

3.13
4.21
Subject: Friend Request suitable primitive brings out
Sender: facebook.com the artistic side of ML 

Didn’t we just solve spam


@ detection as a binary
Subject: Free movie tickets
Sender: winfabulous.xyz 4.38
1.01 classification problem?

Several real-life problems


@ can be solved by ML in
Subject: New Post
Sender: reddit.com 1.56
7.82 multiple ways. There are
many other ways you can
creatively use regression

0
1 10
5
Least
Notlikely
urgent
to be
at all
spam I better
Definitely
checkspam
it ASAP
Exercise
 Recall the daily activity A2 you had thought of (refer to the
video “Getting Started”) for which it was difficult for you to
specify a step-by-step procedure to solve it.

Think of one or more ways in which the ML primitives we just


discussed can solve that problem

Hint: you may have to be creative in what you call a “data


point” and what you call a “label”
A few mini-case studies
Technique 1: via multi-label classification
Treat the set of all possible fruits as the set of possible “labels”
Each user is a data point waiting to be tagged with fruits they like

RECOMMENDATION Technique 2: via regression


This time a data point is a user-fruit pair
Each pair is to be assigned a value, say between 0 and 5 indicative of
Very large number how much the user likes that fruit
of labels if “fruits”
are replaced by “all
products on sale on
()=4 . 6 ()=3 . 8
Amazon”
()=3 . 2 ()=1 .3
Can you think of other techniques?
A few mini-case studies
My name is Melbo Often solved via multi-class classification
Treat each word in the Marathi dictionary as a “class”

माझे नाव Melbo आहे …


मला गणना मराठी आम्ही माझे आहे आमच्या नाव Melbo चला
MACHINE TRANSLATION
Create a data point out of the English sentence and try to predict
the first word of the Marathi sentence correctly
Yup, many modern My name is Melbo  माझे
ML apps have
millions of classes Now, change the data point to include the first Marathi word and
try to predict the second word
My name of theमाझेMarathi
is Melbo,  नाव sentence correctly
Yet again, very large
number of classes!
Repeat till doneMy name is Melbo, माझे, नाव  Melbo
My name is Melbo, माझे, नाव, Melbo  आहे
Exercise
 Think of how you might solve the other example applications
we saw in the beginning using these primitives
Some of these are very complex
problems and several primitives
o Contest winner prediction may be needed for a good solution
o License-plate identification
Hint: first find where the letters are located then find what they are
o Protein folding Give it a try nevertheless … the goal is
not to solve these problems rightaway
Hint: predicting angles may give an idea of how chain is twisting
but to start building intuition
o Game play
ML primitives by form of training data
TEST DATA

Code Code
ML Algorithm ML model
TRAINING DATA

This is the most popular and simplest setting


of learning and called supervised learning
ML primitives by form of training data
Even unlabeled data can be used to make the model more
accurate – semi-supervised learning is a member of a TEST DATA
broader class of methods for learning with weak supervision

? Code Code
ML Algorithm ML model
TRAINING DATA

Why not just throw the


This is called semi- unlabeled points away?
supervised learning
ML primitives by form of training data
Don’t get confused by the name. In ML, There are a other related variants such
online learning does not mean learning as active learning and reinforcement
by watching YouTube videos  learning – will discuss these in due time

Code Code
ML Algorithm ML model

This setting is called online learning


and it promotes continuous learning

PREDICTED TRUE
ML primitives by type of model
Geometric Models @

support vector machines, ridge regression @


@
@

Neural Models
multi-layer perceptron, convolutional networks, transformers
@
@

@
@

@
@
@
ML primitives by type of model
Probabilistic Models Distribution
of
logistic regression, Bayesian models spam emails
Distribution of
non-spam emails
ℙ ¿ @

Models with Memory


learning with prototypes, k-nearest neighbors, decision trees
Summary
ML tasks are usually solved by creatively composing simple
primitives
These primitives allow us to perform a variety of tasks on data such
as classification, regression, ranking, etc.
They allow us to perform ML in a variety of settings e.g.,
supervised, weakly supervised, online, reinforcement etc.
They also allow us to use a variety of models to encode the laws and
patterns we observe in data
ML primitives can be mix-n-matched to create innovative solutions
e.g., deep Bayesian reinforcement learning for recommendation
Stay Curious!
See you next time

You might also like