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
280
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
データサイエンスを価値につなげるプロジェクト設計 〜 DS一年目が現場で得た気づき 〜
ysd113
1
180
10倍の生産性を実現するAI駆動並列エージェントのすべて
kumaiu
5
1.3k
How Timee Delivers Day 1 Production Ready LLM Features
tomoyks
0
130
ルールやカスタム機能、どう活かす?ハンズオンで体感するIBM Bobの出力コントロール
muehara
1
130
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
Claude Codeをどのように キャッチアップしているか
oikon48
5
3.6k
AGENTS.mdとSkillsで始めるAIエージェント活用
sonoda_mj
3
200
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
4
610
Microsoft Build Keynoteふりかえり
tomokusaba
0
120
就職⽀援サービスにおけるキャリアアドバイザーのシフトスケジューリング
recruitengineers
PRO
1
140
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
790
チームで進めるAI駆動アジャイル×ウォーターフォール
kumaiu
0
150
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
The SEO identity crisis: Don't let AI make you average
varn
0
490
Git: the NoSQL Database
bkeepers
PRO
432
67k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Statistics for Hackers
jakevdp
799
230k
Why Our Code Smells
bkeepers
PRO
340
58k
The browser strikes back
jonoalderson
0
1.2k
New Earth Scene 8
popppiees
3
2.3k
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