Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Pystruct - Structured Prediction in Python
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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.7k
Automating Machine Learning
amueller
4
1.2k
Engineering Scikit-Learn V2
amueller
0
320
Advanced Machine Learning with Scikit-Learn for Pycon Amsterdam
amueller
0
310
Scikit-learn: New project features in 0.17
amueller
0
150
Bootstrapping machine learning
amueller
0
150
PyData Berlin 2014 Keynote: Commodity machine learnin
amueller
0
200
Advanced Machine Learning with Scikit-Learn
amueller
1
760
Machine Learning With Scikit-Learn ODSC SF 2015
amueller
4
1.8k
Other Decks in Technology
See All in Technology
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
530
制約理論(ToC)入門 2026版
recruitengineers
PRO
3
360
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
53k
Retriever と Reranker、結局どうする?
kazuaki
2
660
最高のシステムプロンプトを作るためにフィードバック機能を導入した話
alchemy1115
1
330
データ組織の転換期 一足飛びしない段階的戦略
leveragestech
PRO
0
150
モダンフロントエンド 開発研修
recruitengineers
PRO
1
300
LangfuseによるLLMOps基盤の構築と活用事例
zozotech
PRO
1
280
TypeScript入門 2026
recruitengineers
PRO
1
270
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
230
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
130
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
440
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
420
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
530
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Paper Plane
katiecoart
PRO
2
52k
It's Worth the Effort
3n
188
29k
Skip the Path - Find Your Career Trail
mkilby
1
180
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
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