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
かんたん機械学習はじめの1歩AzureMachineLearningでTweetをレコメンド
Search
s2terminal
April 16, 2016
Technology
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
かんたん機械学習はじめの1歩AzureMachineLearningでTweetをレコメンド
s2terminal
April 16, 2016
More Decks by s2terminal
See All by s2terminal
TypeScriptでJupyter
s2terminal
0
130
AIをWebアプリに実装するための便利なPythonライブラリ
s2terminal
0
650
NiceGUI is Nice
s2terminal
0
850
段階的なシステムリプレースを実現するデータ同期技術
s2terminal
0
180
1年でモダンなフロントエンドに追いついた話 2019-08-22 Mix Leap Joint #26
s2terminal
0
50
20190706 BCU30 事業を変えるシステムリプレース
s2terminal
0
70
Cognitive Complexity でコードの複雑さを定量的に計測しよう
s2terminal
2
190
MySQLオンラインマイグレーションツールgh-ostで深夜メンテナンスを無くした話
s2terminal
0
75
Microsoft Azureで 女子力を生成する
s2terminal
0
70
Other Decks in Technology
See All in Technology
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
280
製造現場での生成AIの活用、およびエージェントAIの実装のあり方、AVEVAの取り組み
iotcomjpadmin
0
180
#エンジニアBooks 30分でわかる 「技術記事を書く技術」 / engineer-books 2026-06-30
jnchito
1
130
データレイクの「見えない問題」を可視化する
sansantech
PRO
1
230
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
550
CVE-2026-20833_脆弱性対応とAES 化について
jukishiya
0
160
“詰む”前に仕組みを作れ 〜技術の波に溺れないためのキャッチアップ術〜
takasyou
7
4.3k
AI時代における最適なQA組織の作り方
ymty
3
170
組織における AI-DLC 実践
askul
0
170
UIパーツの設計を「型」から読み解く 〜TSKaigiのセッションから得た学び〜
yud0uhu
0
110
週末にループ・エンジニアリングの理解を深めるためのスライド
nagatsu
0
590
クレデンシャル流出 ― 攻撃 3 時間 vs 復旧 10 時間。この非対称性にどう備えるか
kazzpapa3
3
620
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
320
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
350
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
YesSQL, Process and Tooling at Scale
rocio
174
15k
GraphQLとの向き合い方2022年版
quramy
50
15k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Transcript
Microsoft Global Azure Boot Camp 2016 in Japan suzuki.sh (@s2terminal)
かんたん 機械学習 はじめの1歩 Azure Machine Learning で Tweet を レコメンド
Self Introduction 鈴木就斗 (suzuki.sh) 名古屋のWebエンジニア 合唱音楽の鑑賞が趣味 NinjaSlayer、Splatoon、そしてMicrosoft
Azureがすき twitter: @suzukiterminal facebook: @sh.suzuki.921 GitHub: @s2terminal
Azureを使っているところ はてなブックマークしたURLをPocketに入れるAPI http://s2terminal.hatenablog.com/entry/2015/07/05/165010 Azure API Apps (去年のセッションに触発されて作りました)
Webサービス「合唱音源の新着情報」を運営 http://合唱音源の新着情報.com Azure Virtual Machine + Azure SQL Database Twitter @s2terminal
Twitter投稿データ 合唱音源の新着情報 Azure VM上のアプリケーション(Ruby on Rails)で 登録情報をTwitterに半自動投稿 投稿に含まれる作曲者、曲名などの情報を 詳細データとしてタグ付け管理している
Twitter投稿データ Twitter 800 件分の投稿データ 1,500 件の詳細データ (演奏者、作曲者名などのタグ情報)
3,000 回のリツイート(RT)データ 投稿とRTデータを組み合わせて、RTを評価点としてレコメンドしたい → Azure Machine Learning MatchBox Recommendation を使ってみた
Matchbox Recommendationで用いる3つのデータ item-features ツイートの詳細データ(作曲者名、曲名、投稿日など)に該当 user-features Twitterユーザデータに該当(今回は無し)
user-item-rating 誰がどのツイートをRTしたか?の評価データ これらを使うことで、どんなuserが、どんなitemに評価をするか推測できる データソースにはCSV等いくつかの形式が使用可能
Azure Machine Learningワークスペースを作成 DataSouceをアップロード ML Studio上でDataSource、Train Matchbox Recommendation、Score
Matchboxを配置 Score Matchbox Recommendationの 「Recommended item selection」を 「From Rated Items」→「From All Items」に変更 Project Columnsを配置し、user-item- ratingの評価用出力をuser-idのみに絞る ※ ここまで数式もプログラムも一切なし。かんたん!
結果 Item1 に 「 186 」 がずらり なにかと思ってDBを見てみると… https://twitter.com/s2terminal/status/550310731636158464
最もたくさんRTされた投稿だった 普段は数RTしかされない中で 1個だけ 70 RTを超えているので 誰が考えてもそりゃそうなる。 機械とか関係ない。テクノロジーの欠片もない。 結果はあまり面白くないものの 無事にレコメンドすることができた
WebAPI化 PREPARE WEB SERVICEから、 Web Service Input/Outputを設定 C#、Python、Rの3種類で
サンプルコードが提供される。 今回はRuby on Railsで記述 https://gist.github.com/s2terminal/4a 6d11d90803778e00027d6830e614e7 #file-request_azure_ml-rb ※プログラム書いたのはここだけ! APIを叩くWebサービスを作り Azure VMにdeployして完成
課題 取得できるTweetに偏りがある どのユーザに対しても、単にたくさんRTされたツイートばかり表示される ユーザによってさまざまな結果が出てほしい データを増やしたい
Twitterのお気に入りデータを取得したいが、良いAPIが無い https://twittercommunity.com/t/list-of-people-who-favorited-a-particular-tweet/11083 (料金が正直よくわからない…) https://azure.microsoft.com/ja-jp/pricing/details/machine-learning/ 「スタジオ実験時間」「実稼働」に該当するのはどの時間? 無料プランはどこで選択するの?
まとめ Azure MLでかんたんに機械学習を始めることができる プログラムが必要なのは、WebAPI化時のクライアント側の開発 数学も(最初は)必要ない クラウドサービスなので、スケーラブルな計算リソースや WebベースのGUIツール等が最初から提供される
豊富なサンプルデータが用意されており、すぐに実験できる Why don‘t you use Azure Machine Learning?
参考文献 クラウドではじめる機械学習 Azure MLでらくらく体験 http://www.amazon.co.jp/dp/4897979927 Webブラウザーだけで学ぶ機械学習の「お作法」
http://www.atmarkit.co.jp/ait/articles/1412/01/news104.html Using Train Matchbox Recommender for Data Without Ratings http://www.resolvinghere.com/sm/using-train-matchbox-recommender-for-data- without-ratings.shtml 「Training dataset of user-item-rating triples contains invalid data. . ( Error 0018 )」のエ ラーにはまったとき助けられました