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
Pystruct - Structured Prediction in Python
Search
Andreas Mueller
August 16, 2015
Technology
300
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pystruct - Structured Prediction in Python
Andreas Mueller
August 16, 2015
Transcript
28 slides
PyStruct Structured Prediction in Python Andreas Mueller (NYU Center for
Data Science, scikit-learn)
Structured Prediction
Why structure?
Applications: Multi-Label Classification
Applications: Multi-Label Classification
Applications: Sequence Tagging
Applications: Sequence Tagging
Applications: Image Segmentation
Careful: Math ahead
The Essence of Structured Prediction
The Essence of Structured Prediction
Pairwise Structured Models
Pairwise Structured Models y 1 y 2 y 3 y
4
PyStruct Architecture Estimator = Learner + Model + Inference
PyStruct Architecture Estimator = Learner + Model + Inference model
= ChainCRF(inference="max_product") ssvm = OneSlackSSVM(model=model, C=.1, inference_cache=50,, tol=0.1, verbose=3) ssvm.fit(X_train, y_train)
Sequence Tagging example model = ChainCRF(inference="max_product") ssvm = OneSlackSSVM(model=model, C=.1,
inference_cache=50,, tol=0.1, verbose=3) ssvm.fit(X_train, y_train)
Sequence Tagging example model = ChainCRF(inference="max_product") ssvm = OneSlackSSVM(model=model, C=.1,
inference_cache=50,, tol=0.1, verbose=3) ssvm.fit(X_train, y_train)
The Devil is in the Inference y 1 y 2
y 3 y 4 Easy: Dynamic Programming
The Devil is in the Inference Easy: Dynamic Programming
The Devil is in the Inference HARD! AD3, QPBO, LP,
Loopy BP, ….
Grid Graphs: Snakes
Grid Graphs: Snakes crf = EdgeFeatureGraphCRF(inference_method='qpbo') ssvm = OneSlackSSVM(crf, inference_cache=50,
C=.1, tol=.1, switch_to='ad3', n_jobs=1) ssvm.fit(X_train_edge_features, Y_train_flat)
Grid Graphs: Snakes
Implemented Methods Estimator = Learner + Model + Inference •
Learner: SubgradientSSVM, StructuredPerceptron, OneSlackSSVM, LatentSSVM • Model: BinaryClf, MultiLabelClf, ChainCRF, GraphCRF, EdgeFeatureGraphCRF • Inference: Linear Programming, QPBO (PyQPBO), Dual Decomposition (AD3), Message Passing, everything (OpenGM)
Classes of Inference Algorithms Exact Algorithms Max-Product (Chains, Trees) 'max-product'
Exhaustive (usually too expensive) Relaxed algorithms + branch & bound ('ad3', {'branch_and_bound': True}) Relaxed Linear Programming (slooow) 'lp' Dual Decomposition 'ad3' Approximate / heuristics Loopy message passing 'max-product' QPBO 'qpbo'
Classes of Inference Algorithms Exact Algorithms Max-Product (Chains, Trees) 'max-product'
Exhaustive (usually too expensive) Relaxed algorithms + branch & bound ('ad3', {'branch_and_bound': True}) Relaxed Linear Programming (slooow) 'lp' Dual Decomposition 'ad3' Approximate / heuristics Loopy message passing 'max-product' QPBO 'qpbo' Install OpenGM for many more!
None
Thank you for your attention. @t3kcit @amueller
[email protected]
http://amueller.github.io
More Decks by Andreas Mueller
See All by Andreas Mueller
PyCon India - Commodity Machine Learning; past, present and future
amueller
0
2.8k
Automating Machine Learning
amueller
4
1.2k
Engineering Scikit-Learn V2
amueller
0
340
Advanced Machine Learning with Scikit-Learn for Pycon Amsterdam
amueller
0
330
Scikit-learn: New project features in 0.17
amueller
0
160
Bootstrapping machine learning
amueller
0
170
PyData Berlin 2014 Keynote: Commodity machine learnin
amueller
0
220
Advanced Machine Learning with Scikit-Learn
amueller
1
790
Machine Learning With Scikit-Learn ODSC SF 2015
amueller
4
1.9k
Other Decks in Technology
See All in Technology
AIネイティブ組織の作り方。1人のPOとAIから始める、自社での実験
ama_ch
2
1.2k
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
160
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
170
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
7.1k
小さなエージェントから始めてみよう!実践コンテキストエンジニアリング
iwamot
PRO
0
130
AI時代における医療情報システムのセキュリティ / Security of Healthcare IT Systems in the AI Era
henryofficial
0
190
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
480
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
220
gem install とrequire のむこうがわ
ydah
0
210
gradle-best-practices 使ってみた
mikanichinose
0
150
変更差分を読むために環境を整備しよう
pipepasta
1
470
RAGの改善を速く回すための評価基盤
yosukeyoshida
6
3.1k
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
330
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
320
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Marketing to machines
jonoalderson
1
6k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
Speed Design
sergeychernyshev
33
2.2k