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
svm as a constrainted optimization
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
CookieBox26
February 22, 2022
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
svm as a constrainted optimization
CookieBox26
February 22, 2022
More Decks by CookieBox26
See All by CookieBox26
ずんだもんと雪さんとDeepSeek-R1-Zero
cookiebox26
0
1.4k
最近のTransformer関連の論文から
cookiebox26
0
330
KDD2021の多変量時系列関連のタイトルいくつか
cookiebox26
0
320
固有表現抽出をドメイン外の弱いラベリングたちから学習する
cookiebox26
0
120
Speech and Language Processing 9章 RNNによる系列の処理
cookiebox26
0
2.3k
LSTM to GRU
cookiebox26
0
310
Speech and Language Processing 5章 ロジスティック回帰
cookiebox26
0
380
「統計的因果推論」勉強会 「1. 古典的問題意識」
cookiebox26
0
970
レヴィ過程の経験尤度推定の紹介
cookiebox26
0
700
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
433
67k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Are puppies a ranking factor?
jonoalderson
2
4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
560
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Bash Introduction
62gerente
615
220k
Transcript
サポートベクターマシン (SVM) 4 import numpy as np from sklearn.svm import
SVC X = np.array([[-1, -1], [-1.5, 0], [-2, -1], [1, 1], [2, 1], [1, 2]]) y = np.array([-1, -1, -1, 1, 1, 1]) clf = SVC(kernel='linear') # わかりやすさのため線形 clf.fit(X, y) print('重み', clf.coef_) print('切片', clf.intercept_) • ラベル +1 • ラベル -1 • サポート • 2クラス分類器であって「2クラスを仕切る 仕切りを入れて仕切りに最も近いデータと のマージンを最大にしよう」といったもの。 ‐ 図では入力空間に直接仕切りを入れているが (線 形)、往々にして特徴空間にとばしてからやる。 ‐ 図ではマージン部分へのはみ出しがないがはみ出 してもよい。はみ出しの総和をペナルティする。 • 仕切りが非線形なとき、データが乱雑なと き、学習結果の解釈が不要なとき等にロジ スティック回帰より適すると思われる。 サポート: 仕切りに 最も近いデータ。
SVM の最適化問題のイメージ (1/2) 5 • 入力空間にせよ特徴空間にせよ仕切りを入 れる空間で仕切りを入れる → ラベル +1
のデータたちの箇所では正、ラベル -1 の データたちの箇所では負になる線形関数の 坂道を入れることにしてもよい (この関数 の値が 0 になる箇所が仕切りである)。 • それだけだと線形関数の定数倍の自由度が あるのでラベル ±1 のサポートの箇所での 高さを ±1 となるようにする。そうすると 坂道の傾きだけで仕切り~サポートの距離 も決まる(下図)。 • ラベル +1 • ラベル -1 • サポート 1 1 1 𝑤 坂道の傾き 𝑤 • ということは坂道の傾きが なだらかであればあるほど よい……? 坂道 𝑓 𝑥 = 𝑤T𝑥 + 𝑏 1 𝑤
SVM の最適化問題のイメージ (2/2) 6 • 坂道の傾きがなだらかであればあるほどよ いが、「ラベル +1 のデータは全員高さが 1以上である」「ラベル
-1 のデータは全員 高さが-1以下である」という条件を守らな ければならない(でないとサポートの高さ が ±1 であることに矛盾)。 • ラベル +1 • ラベル -1 • サポート 1 1 1 𝑤 坂道の傾き 𝑤 坂道 𝑓 𝑥 = 𝑤T𝑥 + 𝑏 1 𝑤 _人人人人人人人人人人人人人人_ > 不等式制約付き最適化問題 <  ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄