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
Python ではじめる辞書学習 #1
Search
Hacarus Inc.
February 16, 2018
Technology
0
630
Python ではじめる辞書学習 #1
Presentation slides at Hannnari Python #3
https://hannari-python.connpass.com/event/77366/
Hacarus Inc.
February 16, 2018
Tweet
Share
More Decks by Hacarus Inc.
See All by Hacarus Inc.
QA4AIに則ったMLOpsツールの活用
hacarus
0
560
0から協働ロボット外観検査システムを3ヵ月で具現化した軌跡
hacarus
0
81
ワンちゃんの健康を願う皆様に送る 犬心電図AI解析プロダクト紹介_AWS DevDay2022
hacarus
0
110
犬の心電AI解析プロダクト開発奮闘記 _クラウドからハード開発までてんこ盛り
hacarus
0
1.3k
ExplainableAIの概要とAmazon SageMaker Clarifyでの実装例
hacarus
0
600
AWS Step Functions を用いた非同期学習処理の例
hacarus
0
630
Dashでmyダッシュボードを作ろう ーpytrendsで見るコロナの感染拡大時期ー
hacarus
0
850
Interpretable Machine Learning: モデル非依存な解釈手法の紹介
hacarus
0
740
時系列データ予測手法の宇宙天気予報への応用
hacarus
0
980
Other Decks in Technology
See All in Technology
MongoDB Atlas Vectorsearchではじめる生成AIアプリ開発
chie8842
3
500
複数の LLM モデルを扱う上で直面した辛みまとめ
kazuyaseki
1
210
継続的テストモデルを実現するためにスリーアミーゴスを用いた10Xでのシフトレフトの事例
nihonbuson
2
110
Introduction to Jetpack Compose
pohjus
1
110
Cloud Deploy と仲良くなりたい
phaya72
1
100
匠MethodとRDRAとICONIXとDDDで実現する一気通貫オブジェクト指向開発
haru860
4
1.5k
家族アルバム みてねで直面してきた技術的負債 / MIXI KAG 2024
isaoshimizu
17
7.7k
中央集権体制からDataOpsへの転換 / centralized-to-dataops-transformation
pei0804
7
1.3k
戦略的DDDを実践するための跳躍力 / OOC 2024
pictiny
6
3.2k
Elementaryを用いたデータ品質の可視化とデータ基盤の運用改善
10xinc
6
1.4k
技術広報として2023年度に頑張ったこと / What we did well in FY2023 as a DevRel
pauli
5
450
Ask-LLM論文紹介: How to Train Data-Efficient LLMs
s_ota
0
110
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
113
18k
The Cost Of JavaScript in 2023
addyosmani
13
3.7k
Robots, Beer and Maslow
schacon
PRO
154
7.9k
GraphQLの誤解/rethinking-graphql
sonatard
48
9.1k
Web Components: a chance to create the future
zenorocha
304
41k
10 Git Anti Patterns You Should be Aware of
lemiorhan
644
57k
How STYLIGHT went responsive
nonsquared
92
4.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
14
1.3k
Writing Fast Ruby
sferik
619
59k
Practical Orchestrator
shlominoach
180
9.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
35
2.4k
Transcript
Python ではじめる辞書学習 #1 2018年2月16日 はんなり Python #3 @ウィングス京都
છాوࢤ ͦΊ͔ͩͨ͠ • גࣜձࣾϋΧϧε औక$50 • 1ZUIPOྺ • ؔ+BWBɾ+"846(ɾ%FW-07&ؔ
ք۾
εύʔεϞσϦϯά • σʔλͷεύʔεੑʹணͨ͠ϞσϦϯάख๏ • ೖྗಛྔͷதͷॏཁͳͷ͕Θ͔Δ • গͳ͍ใ͔Βݩͷใͷ෮ݩ͕Ͱ͖Δ
໌ޙ౦ژͰొஃ͠·͢
ຊͷΰʔϧ ߦྻղ XJUIը૾ʹ৮ΕΔ
ߦྻղ • ͋ΔߦྻΛผͷߦྻͷੵͰද͢ ۙࣅ͢Δ ! = #$ ઢܕํఔࣜΛղ͖ͨ͘͢͠Γ σʔλͷ࣍ݩѹॖಛͷநग़ʹΘΕͨΓ
ߦྻղͷ࣮ • /VN1Z • OVNQZMJOBMH ʹ 23ղಛҟղͳͲ • TDJLJUMFBSO •
TLMFBSOEFDPNQPTJUJPO ʹ 1$" *$"ɺ/.'ɺ ࣙॻֶशͳͲ
ը૾ʹద༻ͯ͠ΈΔ • ը૾ΛҰͭͷྻϕΫτϧͱݟཱͯΔ • ෳͷը૾σʔλΛҰͭͷߦྻͱݟཱͯΔ !"" ⋯ !$" ⋮ ⋱
⋮ !"' ⋯ !$' ཁૉ Qͷ Oݸͷը૾αϯϓϧ
σʔληοτ 0MJWFUUJ'BDFTYຕ IUUQTDTOZVFEVdSPXFJTEBUBIUNM
1$" • ࢄΛ࠷େԽ͢ΔํʹओΛநग़ • ֤ओަ • ࣍ݩݮͰ͓ೃછΈ
1$"ͷओ جఈʹݮɺد༩ͷ߹ܭ
1$"Ͱ࠶ߏ
1$" # run PCA from sklearn.decomposition import PCA pca =
PCA(n_components=n_components, svd_solver='randomized’, whiten=True) pca.fit(X_train) # reconstruct original space code = pca.transform(sample.reshape(1, -1)) reconstructed = pca.inverse_transform(code)
1$" • ݩͷσʔληοτ 9ΑΓ͍࣍ݩʹམͱ͢ !" = $%" ݸͷإը૾Λͬ͘͟Γ ύλʔϯʹׂͨ͠Πϝʔδ
*$" • ͷಠཱੑʹண • ࠞ߹৴߸ͷ߹ʹΑ͍ੑೳ
*$" ͷಠཱ
*$"Ͱ࠶ߏ
*$" # run ICA from sklearn.decomposition import FastPCA ica =
FastICA(n_components=n_components, whiten=True) ica.fit(X_train) # reconstruct original space code = ica.transform(sample.reshape(1, -1)) reconstructed = ica.inverse_transform(code)
/.' • ཁૉ͕ඇෛͱ͍͏੍Λିͨ͠ߦྻղ • جఈͷ͠߹ΘͤͰݩͷσʔλΛදݱ • ಛநग़ͱͯ͠ΈΔ͜ͱՄ
/.'ͷಛߦྻ ࣍ݩɺ࠶ߏΤϥʔ ϑϩϏϊεϊϧϜ
/.'Ͱ࠶ߏ
/.' # run NMF from sklearn.decomposition import NMF nmf =
NMF(n_components=n_components) W = nmf.fit_transform(X_train) H = nmf.components_ # reconstruct original image code = nmf.transform(sample.reshape(1, -1)) reconstructed = nmf.inverse_transform(code)
/.' • εύʔεͳղ ਓͷը૾Λ ͷإͷύλʔϯͷ͠߹ΘͤͰදݱ
·ͱΊ • 1$"ɺ*$"ͱ /.'Λෳͷը૾σʔλʹର͠ ࣮ͯࢪ • ࣍ʑճࣙॻֶश • αϯϓϧίʔυ IUUQTHJUJPW"D47
উखʹ ࣍ճ༧ࠂ • 1Z$PO 1)Ϩϙʔτ • དྷि ɺ
ϚχϥͰ։࠵ • ฐࣾϑΟϦϐϯͷΤϯδχΞ͕ొஃ • IUUQTQZDPOQZUIPOQI • ࣍ճΜͳΓ 1ZUIPOʹࢀՃͰ͖Δ ͔