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
290
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
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
330
Advanced Machine Learning with Scikit-Learn for Pycon Amsterdam
amueller
0
320
Scikit-learn: New project features in 0.17
amueller
0
160
Bootstrapping machine learning
amueller
0
160
PyData Berlin 2014 Keynote: Commodity machine learnin
amueller
0
210
Advanced Machine Learning with Scikit-Learn
amueller
1
780
Machine Learning With Scikit-Learn ODSC SF 2015
amueller
4
1.8k
Other Decks in Technology
See All in Technology
20260930_Gemma4_Hands-on
tsho
0
200
大阪オフィスに Unitree Go2 がやってきたので Physical AI やってみた
dafujii
0
200
2026-09-26 Platform Engineering Kaigi 2026 インフラとアプリの境界線と委譲の設計 / Drawing the Infra and App Line
masasuzu
0
540
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
1
120
Account Factory for Terraformによる 標準化されたアカウント発行の自動化
pensuke628
0
120
AIに会社の文脈を理解させる技術~上流工程・非エンジニアにも広げるハーネスエンジニアリング実践~
ochtum
0
200
Swap and Memory Reclaim - Squeezing Out More RAM
ennael
PRO
1
1.5k
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
120
Confitura 2026
logico_jp
0
120
HolmesGPTで始めるSREエージェント入門!プラットフォームの障害調査はAIにお任せ 〜
leveragestech
PRO
0
120
Lambda MicroVMsは常駐サーバーの代わりに なるか? Kiro Crew を動かして検証してみた / Kiro Crew on Lambda MicroVMs
k_adachi_01
2
340
AI Native Platform Engineering 〜PlatformとAgileで“作る速さ”を“価値”へ〜
uya116
0
570
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.5k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
BBQ
matthewcrist
89
10k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
250
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
Site-Speed That Sticks
csswizardry
13
1.5k
Documentation Writing (for coders)
carmenintech
77
5.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Transcript
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