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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
テスト自動化の先、テスト自律化に向けて
mineo_matsuya
3
810
想定外の利用がプロダクトの価値を広げる
lycorptech_jp
PRO
0
130
実測データからサービスの成長余力を測る。負荷シナリオ・テストデータ・限界値の設計
kazatohiei
1
190
Amazon EFS のマルウェアスキャンをClamAV で自前実装したら苦労した話
mtmtfactory01
0
130
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.2k
Ignite 2026 Security
babaneko
0
120
「正しいデータ」の定義をAI エージェントとつくるGoogleADKによるデータ品質定義の実践
takaha4k
0
150
技術同人誌を作る方法
yoshimura_datam
0
110
ポケモンバトルのAIエージェント
koji_kawamura
0
320
Fukurou Labo_Engineer_Deck
fukuroulabo
0
120
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
5
650
20261119_AgentCore
takuyay0ne
2
350
Featured
See All Featured
Believing is Seeing
oripsolob
1
290
Music & Morning Musume
bryan
48
7.5k
The Language of Interfaces
destraynor
163
27k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
370
Become a Pro
speakerdeck
PRO
31
6.4k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
410
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
580
Building the Perfect Custom Keyboard
takai
2
970
Marketing to machines
jonoalderson
1
6k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
How to make the Groovebox
asonas
2
2.6k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
61k