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
660
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.
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
1.1k
QA4AIに則ったMLOpsツールの活用
hacarus
0
670
0から協働ロボット外観検査システムを3ヵ月で具現化した軌跡
hacarus
0
230
ワンちゃんの健康を願う皆様に送る 犬心電図AI解析プロダクト紹介_AWS DevDay2022
hacarus
0
180
犬の心電AI解析プロダクト開発奮闘記 _クラウドからハード開発までてんこ盛り
hacarus
0
1.7k
ExplainableAIの概要とAmazon SageMaker Clarifyでの実装例
hacarus
0
930
AWS Step Functions を用いた非同期学習処理の例
hacarus
0
1.2k
Dashでmyダッシュボードを作ろう ーpytrendsで見るコロナの感染拡大時期ー
hacarus
0
1.4k
Interpretable Machine Learning: モデル非依存な解釈手法の紹介
hacarus
0
1k
Other Decks in Technology
See All in Technology
M3 Expressiveの思想に迫る
chnotchy
0
100
Wasm元年
askua
0
140
急成長を支える基盤作り〜地道な改善からコツコツと〜 #cre_meetup
stefafafan
0
120
Кто отправит outbox? Валентин Удальцов, автор канала Пых
lamodatech
0
340
250627 関西Ruby会議08 前夜祭 RejectKaigi「DJ on Ruby Ver.0.1」
msykd
PRO
2
270
PHP開発者のためのSOLID原則再入門 #phpcon / PHP Conference Japan 2025
shogogg
4
730
VISITS_AIIoTビジネス共創ラボ登壇資料.pdf
iotcomjpadmin
0
160
Node-REDのFunctionノードでMCPサーバーの実装を試してみた / Node-RED × MCP 勉強会 vol.1
you
PRO
0
110
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
200
2025-06-26_Lightning_Talk_for_Lightning_Talks
_hashimo2
2
100
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
150
強化されたAmazon Location Serviceによる新機能と開発者体験
dayjournal
2
210
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Building an army of robots
kneath
306
45k
We Have a Design System, Now What?
morganepeng
53
7.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Invisible Side of Design
smashingmag
299
51k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
KATA
mclloyd
29
14k
GitHub's CSS Performance
jonrohan
1031
460k
Typedesign – Prime Four
hannesfritz
42
2.7k
The Pragmatic Product Professional
lauravandoore
35
6.7k
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ʹࢀՃͰ͖Δ ͔