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
論文読んだ「Simple and Deterministic Matrix Sketching」
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shinichi Takayanagi
April 08, 2019
Science
1.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
論文読んだ「Simple and Deterministic Matrix Sketching」
Shinichi Takayanagi
April 08, 2019
More Decks by Shinichi Takayanagi
See All by Shinichi Takayanagi
論文紹介「Evaluation gaps in machine learning practice」と、効果検証入門に関する昔話
stakaya
0
1.2k
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
1.7k
[NeurIPS 2023 論文読み会] Wasserstein Quantum Monte Carlo
stakaya
0
600
[KDD2021 論文読み会] ControlBurn: Feature Selection by Sparse Forests
stakaya
2
2k
[ICML2021 論文読み会] Mandoline: Model Evaluation under Distribution Shift
stakaya
0
2.1k
[情報検索/推薦 各社合同 論文読み祭 #1] KDD ‘20 "Embedding-based Retrieval in Facebook Search"
stakaya
2
670
【2020年新人研修資料】ナウでヤングなPython開発入門
stakaya
28
22k
Quick Introduction to Approximate Bayesian Computation (ABC) with R"
stakaya
3
390
The Road to Machine Learning Engineer from Data Scientist
stakaya
5
4.5k
Other Decks in Science
See All in Science
東北地方における過去20年間の降水量の変化
naokimuroki
1
240
YouTubeにおける撤回論文の参照実態 / metascience-meetup2026
corgies
3
280
Accelerating operator Sinkhorn iteration with overrelaxation
tasusu
0
350
不動産業界における業界特化のデータ整備とAI活用 ─Vertical DataとVertical AI─
estie
1
510
検索と推論タスクに関する論文の紹介
ynakano
1
230
先端因果推論特別研究チームの研究構想と 人間とAIが協働する自律因果探索の展望
sshimizu2006
3
930
機械学習 - 決定木からはじめる機械学習
trycycle
PRO
0
1.5k
HajimetenoLT vol.17
hashimoto_kei
1
240
[NLP2026 参加報告会] AI for Science まとめ / NLP2026
lychee1223
0
1.9k
生成AI・プレプリント時代における 研究成果公開の再設計 ― トップカンファレンス文化はどこへ向かうのか / Redesigning the Dissemination of Research Outputs in the Age of Generative AI and Preprints — Where Is the Top-Conference Culture Heading?
ykiyota
0
12k
SpatialRDDパッケージによる空間回帰不連続デザイン
saltcooky12
0
240
【論文紹介】Is CLIP ideal? No. Can we fix it?Yes! 第65回 コンピュータビジョン勉強会@関東
shun6211
5
2.5k
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
400
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Thoughts on Productivity
jonyablonski
76
5.2k
Designing for Timeless Needs
cassininazir
1
250
Utilizing Notion as your number one productivity tool
mfonobong
4
320
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Discover your Explorer Soul
emna__ayadi
2
1.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
Transcript
Simple and Deterministic Matrix Sketching Edo Liberty (Yahoo! Labs )
(KDD 2013, best research paper) 高柳慎一 @_stakaya 論文読んだ
本日のお持ち帰り • 近似精度の保証付で行列圧縮法を提案 • n x m の行列Aを l x
mの行列Bへと圧縮 – l << n • 以下の量(分散的なもの)を良く近似させる • 理論保証あり 2
Matrix Sketching • Matrix Sketchingでは列ではなく行を削除 –皆大好きPCAは列を削除 • 直観的には頻出ベクトルを残す操作 –行空間(Not特徴量(列)空間)の基底探し的な –k-meansのクラスタ中心を残すイメージ
• Frequent Directionという手法を提案 3
Algorithm 4 O(nml)でいける (SVDがO(ml^2)で, n/(2/l)回やるので) 各行に対して逐次ループ
理論的な上限 • || ⋅ || はフロベニウスノルム • || ⋅ ||はスペクトルノルム(多分)
• 削減する次元 lを決めると自動的に上限が決 まる(うれしい) 5
その他のご利益 • オンライン更新OK –各行に対して独⽴に実行可能(for … in Algorithm) • 並列可 –行列Aを部分行列にばらして処理→その後Merge
6
Before we start • よく使う等式を示す – は行列Aの各行 –はiループでの行列B –はiループでの行列C •
は−1 の全0な行に を挿入してVでぐ るっと回転させてるだけなので 7
上限の証明-1 8 xはATA − BTBの最大固有値の固有ベクトル ∑で 0, 以外は全部消える 0は零行列なのでやっぱりいらん 前Pの等式を代入
Algorithmで 定義したΣを各々代入 − の真ん 中の(気持ち)√取って シュワルツの不等式 行列ノルムの定義 に従って頑張る アルゴリズムのここを見る
上限の証明-2 9 よりも大きいものが少なく ともl/2個アルゴリズム的に 残っているはずなので成⽴
上限の証明 • 上限の証明-1, 2を組み合わせればOK 10
やってみる • Python版は数年前にPFNのHido氏がやってる 11 https://www.slideshare.net/shoheihido/kdd-25788780
やってみる • 完全にHidoさんを真似る –同じと思われるデータがKaggleに転がってた 12 https://www.kaggle.com/bistaumanga/usps-dataset/version/1
やってみる • R版がない(と思う) –ないならば、作って見せよう、ホクソエム 13
つくった 14 https://github.com/shinichi-takayanagi/frequent-directions
インストール 15 devtools::install_github("shinichi-takayanagi/frequentdirections")
データを読む • Kaggleからサンプルデータを落としてからの 16 library("h5") file <- h5file("C:¥¥temp¥¥usps.h5") x <-
scale(file["train/data"][]) y <- file["train/target"][] > x[1:5, 1:6] [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 -0.6198367 [2,] -0.0692796 -0.124749 -0.1999769 0.2073071 0.2038526 -0.3160401 [3,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 -0.6198367 [4,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 0.5364991 [5,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 -0.5053164
データを読む 17 image(matrix(x[338,], nrow=16, byrow = FALSE))
とりあえずSVDで 18 frequentdirections::plot_svd(x, y)
俺俺Matrix Sketching(l=8) 19 eps <- 10^(-8) frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 8,
eps))
俺俺Matrix Sketching (l=16) 20 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 16, eps))
俺俺Matrix Sketching (l=32) 21 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 32, eps))
俺俺Matrix Sketching (l=64) 22 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 64, eps))
俺俺Matrix Sketching (l=128) 23 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 128, eps))
まとめ • 近似精度の保証付で行列圧縮法をお勉強した • 理論保証があって嬉しい • Rのパッケージ作った –上手く行ってるような気もするがなんか違う気もする –単体テストとかCRANは次にやる 24