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
More Decks by Rebecca Vickery
See All by Rebecca Vickery
Pair Programming with AI
rebeccavickery
1
110
Machine Learning for Everyone
rebeccavickery
0
33
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
67
Employing Google Cloud Machine Learning Engine to Develop Models in Production
rebeccavickery
0
1.3k
Other Decks in Technology
See All in Technology
Spring BootからQuarkusへの移行
tatsuya1bm
2
110
AI に書かせたその API、 “信頼” できますか?
nagix
0
110
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.8k
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
8
3.7k
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.9k
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
1
1.3k
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
210
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
150
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
140
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.5k
GoにおけるFFIのこれまでとこれから
goccy
5
3.2k
beyond jj: config & tools ecosystem
indirect
0
380
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
900
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
240
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Transcript
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...