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
Sparse Modeling in Python
Search
Hacarus Inc.
February 25, 2018
Technology
0
930
Sparse Modeling in Python
Presentation slides at PyCon PH 2018 Lightning Talks
Hacarus Inc.
February 25, 2018
Tweet
Share
More Decks by Hacarus Inc.
See All by Hacarus Inc.
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
1.2k
QA4AIに則ったMLOpsツールの活用
hacarus
0
680
0から協働ロボット外観検査システムを3ヵ月で具現化した軌跡
hacarus
0
240
ワンちゃんの健康を願う皆様に送る 犬心電図AI解析プロダクト紹介_AWS DevDay2022
hacarus
0
190
犬の心電AI解析プロダクト開発奮闘記 _クラウドからハード開発までてんこ盛り
hacarus
0
1.7k
ExplainableAIの概要とAmazon SageMaker Clarifyでの実装例
hacarus
0
970
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
KiroでGameDay開催してみよう(準備編)
yuuuuuuu168
1
130
会社にデータエンジニアがいることでできるようになること
10xinc
9
1.6k
広島発!スタートアップ開発の裏側
tsankyo
0
240
[OCI Skill Mapping] AWSユーザーのためのOCI(2025年8月20日開催)
oracle4engineer
PRO
2
140
[CVPR2025論文読み会] Linguistics-aware Masked Image Modelingfor Self-supervised Scene Text Recognition
s_aiueo32
0
210
Yahoo!広告ビジネス基盤におけるバックエンド開発
lycorptech_jp
PRO
1
270
ECS モニタリング手法大整理
yendoooo
1
120
Go で言うところのアレは TypeScript で言うとコレ / Kyoto.なんか #7
susisu
5
1.5k
広島銀行におけるAWS活用の取り組みについて
masakimori
0
130
人と組織に偏重したEMへのアンチテーゼ──なぜ、EMに設計力が必要なのか/An antithesis to the overemphasis of people and organizations in EM
dskst
5
600
AIエージェント就活入門 - MCPが履歴書になる未来
eltociear
0
440
Understanding Go GC #coefl_go_jp
bengo4com
0
1.1k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
The Art of Programming - Codeland 2020
erikaheidi
55
13k
A better future with KSS
kneath
239
17k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Optimizing for Happiness
mojombo
379
70k
Visualization
eitanlees
147
16k
Music & Morning Musume
bryan
46
6.7k
Writing Fast Ruby
sferik
628
62k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
Transcript
Sparse Modeling in Python Feb 25th, 2018 PyCon PH 2018
@tksmd
,ZPUP IUUQTXXXGMJDLSDPNQIPUPTQFESPT[
8IBUJTz4QBSTF.PEFMJOHz • .FUIPE UP BOBMZ[F EBUBXJUIl4QBSTJUZz • 7BSJPVT EJTDVTTJPOT TUBSUFEBSPVOE
JOBDBEFNJB • *NBHFQSPDFTTJOHJTPOFPGUIFIPU BQQMJDBUJPOT
"EWBOUBHFT • 4FMFDUJNQPSUBOUGFBUVSFTPGJOQVU • 8PSLXJUI FWFO TNBMMBNPVOUPGEBUB
5 %BNBHFEFUFDUJPOPGXBMMPGCVJMEJOH &YBNQMFPGJNBHFBOBMZTJT
#SJFGFYBNQMFPGGFBUVSFTFMFDUJPO
1PMZOPNJBM3FHSFTTJPO ! = −$%& + $ + Observational Noise
1PMZOPNJBM3FHSFTTJPO -JOFBS3FHSFTTJPO 0WFSGJUUJOH
1PMZOPNJBM3FHSFTTJPO $PFGGJDJFOUPGTJNQMFMJOFBSSFHSFTTJPO
1PMZOPNJBM3FHSFTTJPO -FBTUBCTPMVUFTISJOLBHFBOETFMFDUJPOPQFSBUPS -BTTP
1PMZOPNJBM3FHSFTTJPO $PFGGJDJFOUPG-"440
1PMZOPNJBM3FHSFTTJPO 0SUIPHPOBM.BUDIJOH1VSTVJU 0.1
1PMZOPNJBM3FHSFTTJPO $PFGGJDJFOUPG0.1
1PMZOPNJBM3FHSFTTJPO from sklearn.linear_model import LinearRegression, Lasso, OrthogonalMatchingPursuit from sklearn.preprocessing import
PolynomialFeatures from sklearn.pipeline import make_pipeline poly_preprocess = PolynomialFeatures(poly_dim, include_bias=False) # models linear = LinearRegression() lasso = Lasso(alpha=0.002, max_iter=500000, tol=0.000001) omp = OrthogonalMatchingPursuit(n_nonzero_coefs=5) def fit_and_predict(predictor): model = make_pipeline(poly_preprocess, predictor) model.fit(x.reshape(-1, 1), y) y_predicted = model.predict(x.reshape(-1, 1)) t_predicted = model.predict(t.reshape(-1, 1)) return y_predicted, t_predicted
1PMZOPNJBM3FHSFTTJPO • 4UBSUXJUIMFBTUTRVBSFNFUIPE min 1 2 & − () *
Z PVUQVU X XFJHIU Y JOQVU $PNQVUF X UPTBUJTGZBCPWF
1PMZOPNJBM3FHSFTTJPO • "EESFHVMBUJPOUFSNUPBWPJEPWFSGJUUJOH min 1 2 & − () *
+ , ( - 4VSQSFTT PWFSGJUUJOH CZ BEEJOH DPOTUSBJOU UP XFJHIUX -/PSN -BTTPɾ-/PSN3JEHF
1PMZOPNJBM3FHSFTTJPO • "QQSPBDIUP-/PSN0QUJNJ[BUJPO min 1 2 & − () *
+ , ( - 5IJT JTFTTFOUJBMMZDPNCJOBUJPOBMPQUJNJ[BUJPOQSPCMFN /1IBSE (SFFEZBMHPSJUINUPTPMWFJUMPDBMMZMJLF.BUDIJOH1VSTVJU *)5
4VNNBSZ • *OUSPEVDUJPOPG4QBSTF.PEFMJOHJO1ZUIPO • 4PNFJNQMFNFOUBUJPOJTBMSFBEZBWBJMBCMF JO/VN1Z PSTDJLJUMFBSO • +VQZUFS OPUFCPPLJTBWBJMBCMFCFMPX
• IUUQTHJUJPW/&O
-PDBM6TFS(SPVQJO,ZPUP IUUQTIBOOBSJQZUIPODPOOQBTTDPN SE 'SJEBZ FWFSZNPOUI