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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Rust で関数型ドメインモデリング
takonda
0
170
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
120
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
5.1k
ストレスなくAIと付き合いたい!こんなときどうしてる?
namiki64
4
610
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
200
その Valkey 使いこなしていますか?
onk
PRO
5
1.6k
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
200
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
290
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
130
価値について
gree_tech
PRO
0
100
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
590
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Building Adaptive Systems
keathley
44
3.3k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Technical Leadership for Architectural Decision Making
baasie
3
600
Unsuck your backbone
ammeep
672
58k
Being A Developer After 40
akosma
92
590k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
The browser strikes back
jonoalderson
0
1.8k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
YesSQL, Process and Tooling at Scale
rocio
174
15k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
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...