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
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
310
Advanced Machine Learning with Scikit-Learn for Pycon Amsterdam
amueller
0
300
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
証券システムを10年Scalaで作り続けるということ - 関数型まつり2026
krrrr38
3
700
CSに"SLO"は要らない、経営層に"99.9%"は伝わらない - SREを全社に"翻訳"する3原則
cscengineer
PRO
0
2.6k
アカウントが増えてからでは遅い? ~ マルチアカウント統制の勘所 ~
kenichinakamura
0
160
そのタスクオンスケですか?
poropinai1966
0
140
Mastraエージェント、どのクラウドにデプロイする?
minorun365
PRO
2
170
プロダクトだけじゃない、社内プロセスにおける自動化・省力化ノススメ
kakehashi
PRO
1
1.5k
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
1
1.4k
cccccc
moznion
0
1.8k
Control Planeで育てるBtoB SaaSの認証基盤 - SRE NEXT 2026
pokohide
1
730
ZOZOTOWNの進化と信頼性を両立する負荷試験
zozotech
PRO
0
130
Why is RC4 still being used?
tamaiyutaro
0
300
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
140
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
300
Building AI with AI
inesmontani
PRO
1
1.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Bash Introduction
62gerente
615
220k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Done Done
chrislema
186
16k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Statistics for Hackers
jakevdp
799
230k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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