0% found this document useful (0 votes)
13 views36 pages

INtro To ML

Uploaded by

dasaditi2312
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views36 pages

INtro To ML

Uploaded by

dasaditi2312
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

INTRODUCTOIN TO AI

An Introduction toMachine Learning


Outline

Machine Learning
• Types of Machine Learning Problems
• Steps to solve a MachineLearning Problem
• Summary

1
6
What is a cat?

1
7
What is a cat?

Occlusion Diversity Deformation Lighting variations

1
8
Introduction to machine learning
Introduction to Machine Learning

What is Machine Learning?


The subfield of computer science that “gives computers the ability to learn
without being explicitly programmed”.
(Arthur Samuel, 1959)
Acomputer program is said to learn from experience Ewith respect to some
class of tasks Tand performance measure Pif its performance at tasks in T, as
measured by P,improves with experience E.”
(Tom Mitchell, 1997)

Using data for answeringquestions


Training Predicting

20
Introduction to Machine Learning

The big data era


Data Devices Services
Cloud Computing:
• Data already available Everyone has a computer • Online storage
everywhere fully packed with sensors: • Infrastructure as a
• GPS Service
• Low storage costs:
everyone has several GBs • Cameras
User applications:
for “free” • Microphones
• YouTube
• Hardware more Permanently connected to • Gmail
powerful and cheaper than Internet • Facebook
ever before • Twitter

21
Introduction to Machine Learning

Types of machine learning problems

 Supervised

 Unsupervised

 Reinforcement

22
Introduction to Machine Learning
Types of machine learning problems
Learn through examples of which we knowthe
Supervised desired output (what we want topredict).

Is this a cat or a dog?

Are these emails spam or not?


Unsupervised
Predict the market value of houses, given the square
meters, number of rooms, neighborhood, etc.

Reinforcement
23
Introduction to Machine Learning

Types of machine learning problems

Supervised Classification

Output is a discrete variable


(e.g.,cat/dog)

Unsupervised
Regression

Output is continuous
Reinforcement (e.g., price, temperature)
24
Introduction to Machine Learning
Types of machine learning problems

Supervised

There is no desired output. Learn something about the


data. Latent relationships.

Unsupervised We have photos and want to put them in 20 groups.

We want to find anomalies in the credit card usage


patterns of our customers.

Reinforcement
25
Introduction to Machine Learning
Types of machine learning problems

Supervised Useful for learning structure in the data(clustering), hidden


correlations, reduce dimensionality,etc.

Unsupervised

Reinforcement
26
Introduction to Machine Learning
Types of machine learning problems

Supervised An agent interacts with an environment andwatches the


result of the interaction.

Environment gives feedback via a positive or negative


reward signal.
Unsupervised

Reinforcement
27
Introduction to Machine Learning

Steps to solve a machine learning problem

Data Data Feature Algorithm Selection Making


Gathering Preprocessing Engineering & Training Predictions
Collect data from Clean data to have Making your data Selecting the right machine Evaluate the model
various sources
homogeneity more useful learning model

28
Introduction to Machine Learning

Data gathering
Might depend on humanwork
• Manual labeling for supervised learning.
• Domain knowledge. Maybe evenexperts.
May come for free, or “sortof”
• E.g., Machine Translation.
The more the better: Some algorithms need large amounts of data to be useful
(e.g., neural networks).
The quantity and quality of data dictate the model accuracy

29
Introduction to Machine Learning

Data preprocessing
Is there anything wrong with the data?
• Missing values
• Outliers
• Bad encoding (fortext)
• Wrongly-labeled examples
• Biased data
• Do we have many more samples of one class
than the rest?

Need to fix/remove data?


30
Introduction to Machine Learning
Feature engineering
What is a feature?
Buy ch34p drugs
A feature is an individual measurable property
from the ph4rm4cy
of a phenomenon being observed
now :) :) :)
Our inputs are represented by a set of features.
To classify spam email, features couldbe: Feature
engineering
• Number of words that have been ch4ng3d
like this.
• Language of the email (0=English, (2, 0, 3)
1=Spanish)
• Number of emojis 31
Introduction to Machine Learning
Feature engineering
Extract more information from existing data, not adding “new” data
• Making it more useful
• With good features, most algorithms can learn faster

It can be an art
• Requires thought and knowledge of thedata
Two steps:
• Variable transformation (e.g., dates into weekdays, normalizing)
• Feature creation (e.g., n-grams for texts, if word is capitalizedto detect
names, etc.) 32
Introduction to Machine Learning

Algorithm selection & training


Supervised Unsupervised Reinforcement
• Linear classifier • PCA • SARSA–λ
• Naive Bayes • t-SNE • Q-Learning
• Support Vector Machines (SVM) • k-means
• Decision Tree • DBSCAN
• Random Forests
• k-Nearest Neighbors
• Neural Networks (Deeplearning)
33
Introduction to Machine Learning
Algorithm selection & training
Goal of training: making the correct prediction as often as possible
• Incremental improvement:

Predict Adjust

• Use of metrics for evaluating performance and comparingsolutions


• Hyperparameter tuning: more an art than ascience

34
Introduction to Machine Learning

Making predictions
Training Phase

Labels
Machine
Learning
Feature model
Samples extraction Features

Prediction Phase
Input Feature Features Trained Label
extraction classifier
35
Introduction to Machine Learning

Summary
• Machine Learning is intelligent use of data to answer questions
• Enabled by an exponential increase in computing power and data
availability
• Three big types of problems: supervised, unsupervised,reinforcement
• 5 stepsto every machine learning solution:
1. Data Gathering
2. Data Preprocessing
3. Feature Engineering
4. Algorithm Selection &Training
5. Making Predictions 36

You might also like