Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Data Preparation and the Importance of How Mach...
Search
Rebecca Vickery
February 05, 2020
Technology
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Data Preparation and the Importance of How Machines Learn
Rebecca Vickery
February 05, 2020
Transcript
32 slides
None
Data Preparation and the Importance of how Machines Learn Rebecca
Vickery, Data Scientist, Holiday Extras
Machine learning
Source: Google images
Simple ML workflow Get data >> baseline model >> model
selection >> model tuning >> predict
Simple ML workflow Get data >> Features/Inputs What we want
to predict
Simple ML workflow Baseline model >> Accuracy score Perfect =
1.0 0.44
Simple ML workflow Model selection >> Best model = Random
Forest
Simple ML workflow Hyperparameter optimisation >> Best score = 1.0
Best Params = {'max_depth': 5, 'min_samples_leaf': 1, 'min_samples_split': 10, 'n_estimators': 500}
Source: Google images
What happens when we have this data set?
What happens when we have this data set?
None
Source: thedailybeast.com
Actual ML workflow Get data >> data preparation >> feature
engineering >> baseline model >> model selection >> model tuning >> predict
Label encoding
Problem Source: flaticon.com 4 is bigger than 1 so there
must be a relationship between these rows Source: flaticon.com 1 = neutered male 2 = spayed female 3 = intact male
Solution: One hot encoding
Ordinal data
Problem: Won’t work for all variables 366 different unique values
= 366 new features
Solution: Feature engineering? Single Colour Multi Colour
Problem: We will lose a lot of information Source: thetelegraph.com
Solution: Weight of evidence For each colour (e.g. Tan): WOE
= ln ( ( pi /p) / ( ni / n) ) pi = number of times Tan appears in positive class (1) p = total number of positive classes (1) ni = number of times Tan appears in negative class (0) n = total number of negative classes (0)
Solution: Weight of evidence Output is a positive or negative
number
Solution(s) WOE is one of many solutions for this
Problem(s) Source: Photo by Louis Reed on Unsplash
Solution: Scikit-learn pipelines
Solution: category_encoders pip install category_encoders
Pipeline example
Less time But still some work to do
“There are only two Machine Learning approaches that win competitions:
Handcrafted & Neural Networks.” Anthony Goldbloom, CEO & Founder, Kaggle
Thanks for listening Find me at...
More Decks by Rebecca Vickery
See All by Rebecca Vickery
Pair Programming with AI
rebeccavickery
1
120
Machine Learning for Everyone
rebeccavickery
0
35
Scaling Machine Learning at Holiday Extras (Big Data LDN 2019))
rebeccavickery
0
140
Scaling_Machine_Learning_at_Holiday_Extras_-_MUC.pdf
rebeccavickery
0
1.2k
Gender Bias, Why we Need More Women in Tech
rebeccavickery
0
1.2k
The Fastest Way to Learn Data Science
rebeccavickery
0
69
Employing Google Cloud Machine Learning Engine to Develop Models in Production
rebeccavickery
0
1.3k
Other Decks in Technology
See All in Technology
HTTP通信に使おうとすると実はめんどくさいfile_get_contents
maguroalternative
0
260
みん強Lightning! データ基盤ひとりでできるかな
endonanana
0
180
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
200
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
290
目を覚ませ!僕らの認証情報が何者かに侵略されてるぞ
tkito
2
480
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
200
RAGの改善を速く回すための評価基盤
yosukeyoshida
6
3.5k
異夢同船〜異なる夢でも同じ船でなんとかする〜
fortegp05
1
590
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
210
データから見る AI時代のエンジニア転職と採用
junya_okura
4
1.2k
20261113_JAWS_Osaka
takuyay0ne
1
600
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
630
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Discover your Explorer Soul
emna__ayadi
2
1.3k
A Tale of Four Properties
chriscoyier
163
24k
Accessibility Awareness
sabderemane
1
310
Mind Mapping
helmedeiros
1
450
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Marketing to machines
jonoalderson
1
6k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
490
Exploring anti-patterns in Rails
aemeredith
4
580