Chapter 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

What is machine

learning?
U N D E R S TA N D I N G M A C H I N E L E A R N I N G

Lis Sulmont
Curriculum Manager, DataCamp
UNDERSTANDING MACHINE LEARNING
UNDERSTANDING MACHINE LEARNING
UNDERSTANDING MACHINE LEARNING
UNDERSTANDING MACHINE LEARNING
UNDERSTANDING MACHINE LEARNING
UNDERSTANDING MACHINE LEARNING
Artificial intelligence (AI)

A huge set of tools for making computers


behave intelligently

UNDERSTANDING MACHINE LEARNING


Artificial intelligence (AI)

A huge set of tools for making computers


behave intelligently

Machine learning is the most prevalent subset


of AI

UNDERSTANDING MACHINE LEARNING


Defining machine learning:
A set of tools for making inferences and predictions from data

UNDERSTANDING MACHINE LEARNING


Defining machine learning: what can it do?
Predict future events
Will it rain tomorrow?
Yes (75% probability)

Infer the causes of events and behaviors


Why does it rain?
Time of the year, humidity levels, temperature, location, etc

Infer patterns
What are the different types of weather conditions?
Rain, sunny, overcast, fog, etc

UNDERSTANDING MACHINE LEARNING


Defining machine learning: how does it work?
Interdisciplinary mix of statistics and computer science
Ability to learn without being explicitly programmed

Learn patterns from existing data and applies it to new data

Relies on high-quality data

... more to come throughout the course!

UNDERSTANDING MACHINE LEARNING


Data science

Data science is about discovering and


communicating insights from data

UNDERSTANDING MACHINE LEARNING


Data science

Data science is about making discoveries and


creating insights from data

Machine learning is often an important tool


for data science work

UNDERSTANDING MACHINE LEARNING


Machine learning model
A statistical representation of a real-world process based on data

UNDERSTANDING MACHINE LEARNING


Machine learning model
A statistical representation of a real-world process based on data

UNDERSTANDING MACHINE LEARNING


Machine learning model
A statistical representation of a real-world process based on data

UNDERSTANDING MACHINE LEARNING


Machine learning model
A statistical representation of a real-world process based on data

UNDERSTANDING MACHINE LEARNING


Let's practice!
U N D E R S TA N D I N G M A C H I N E L E A R N I N G
Machine learning
concepts
U N D E R S TA N D I N G M A C H I N E L E A R N I N G

Lis Sulmont
Curriculum Manager, DataCamp
Three types of machine learning

1) Reinforcement learning
2) Supervised learning
3) Unsupervised learning

UNDERSTANDING MACHINE LEARNING


Training data
Training data: existing data to learn from
Training a model: when a model is being built from training data
Can take nanoseconds to weeks

UNDERSTANDING MACHINE LEARNING


Supervised learning training data

UNDERSTANDING MACHINE LEARNING


Supervised learning training data

UNDERSTANDING MACHINE LEARNING


Supervised learning training data

UNDERSTANDING MACHINE LEARNING


Supervised learning training data

UNDERSTANDING MACHINE LEARNING


Supervised learning training data

UNDERSTANDING MACHINE LEARNING


After training (supervised learning)

UNDERSTANDING MACHINE LEARNING


After training (supervised learning)

UNDERSTANDING MACHINE LEARNING


After training (supervised learning)

UNDERSTANDING MACHINE LEARNING


Supervised vs unsupervised learning
Supervised learning
Training data is "labeled"

Unsupervised learning
Training data only has features

Useful for:
Anomaly detection

Clustering, e.g., dividing data into


groups

UNDERSTANDING MACHINE LEARNING


Unsupervised learning training data

UNDERSTANDING MACHINE LEARNING


Unsupervised learning training data

UNDERSTANDING MACHINE LEARNING


After training (unsupervised learning)

UNDERSTANDING MACHINE LEARNING


Unsupervised Learning
In reality, data doesn't always come with labels
Requires manual labor to label

Labels are unknown

No labels: model is unsupervised and finds its own patterns

UNDERSTANDING MACHINE LEARNING


Let's practice!
U N D E R S TA N D I N G M A C H I N E L E A R N I N G
Machine learning
workflow
U N D E R S TA N D I N G M A C H I N E L E A R N I N G

Lis Sulmont
Curriculum Manager, DataCamp
Machine learning workflow

UNDERSTANDING MACHINE LEARNING


Our scenario
Our dataset: NYC property sales from 2015-
2019

Includes:

Square feet

Neighborhood

Year built

Sale price

And more!

Our target: Sale price

UNDERSTANDING MACHINE LEARNING


Step 1: Extract features

UNDERSTANDING MACHINE LEARNING


Step 2: Split dataset

UNDERSTANDING MACHINE LEARNING


Step 3: Train model

UNDERSTANDING MACHINE LEARNING


Step 3: Train model

UNDERSTANDING MACHINE LEARNING


Step 4: Evaluate

UNDERSTANDING MACHINE LEARNING


Step 4: Evaluate

Test dataset: "unseen" data

Many ways to evaluate:


What is the average error of the predictions?

What percent of apartments did the model accurately predict within a 10% margin?

UNDERSTANDING MACHINE LEARNING


Step 4: Evaluate

UNDERSTANDING MACHINE LEARNING


Step 4: Evaluate

UNDERSTANDING MACHINE LEARNING


Step 4: Evaluate

If not, tune the model and re-train it:


e.g., change the model's options, add/remove features

UNDERSTANDING MACHINE LEARNING


Machine learning workflow

UNDERSTANDING MACHINE LEARNING


Summary of steps
1. Extract features
Choosing features and manipulating the dataset

2. Split dataset
Train and test dataset

3. Train model
Input train dataset into a machine learning model

4. Evaluate
If desired performance isn't reached: tune the model and repeat Step 3

UNDERSTANDING MACHINE LEARNING


Let's practice!
U N D E R S TA N D I N G M A C H I N E L E A R N I N G

You might also like