iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 4
0
Data Technology

Microsoft R Solution系列 第 4

Day04 - 實測Microsoft R Open

接下我們要在新的R專案裡實測Microsoft R Open效能, 希望跑出類似底下官方提供的數據
https://ithelp.ithome.com.tw/upload/images/20171222/20103333fsgnFyFcyW.png

這裡我們使用andrie大神所製作的version.compare R 套件來做測試, 參考網址如下
https://github.com/andrie/version.compare

若直接用R安裝套件的方式, 會遇到底下的錯誤訊息
https://ithelp.ithome.com.tw/upload/images/20171222/20103333lbZQuNQJu6.png

原因是andrie並沒有發佈到R的官方套件庫位置, 所以直接從andrie的github位置直接安裝, 要能從github安裝套件, 必須安裝底下套件並用library載入,輸入底下指令
install.packages("githubinstall")
library(githubinstall)
githubinstall("version.compare")
https://ithelp.ithome.com.tw/upload/images/20171222/20103333O7oGVULhqJ.png

接著詢問是否安裝andrie的套件, 輸入y, 完成安裝
https://ithelp.ithome.com.tw/upload/images/20171222/20103333slKB7ann8H.png

最後完成安裝如下
https://ithelp.ithome.com.tw/upload/images/20171222/20103333cYIYrVgvlb.png

接著在Script.R, 輸入底下紅框程式碼執行
https://ithelp.ithome.com.tw/upload/images/20171222/20103333PRZYpqgkUL.png

當出現底下紅框時, 可以把工作管理員叫起來看一下
https://ithelp.ithome.com.tw/upload/images/20171222/20103333hMYmzPDiRq.png

此時可以發現某一個core是幾乎跑到滿的
https://ithelp.ithome.com.tw/upload/images/20171222/20103333rnCAtAHbuI.png

接著會出現執行Microsoft R Open的訊息
https://ithelp.ithome.com.tw/upload/images/20171222/20103333IFr5Xi4hwE.png

此時工作管理員, 可以觀察到跑滿4個core
https://ithelp.ithome.com.tw/upload/images/20171222/20103333V3NiyyjxhA.png

接著點擊test.results 檢視結果
https://ithelp.ithome.com.tw/upload/images/20171222/20103333m4QUZ9Mcfa.png

果然在矩陣運算大幅超車啊/images/emoticon/emoticon08.gif
https://ithelp.ithome.com.tw/upload/images/20171222/20103333AP3SWfEwDs.png

只能說感謝微軟佛心還是將這個功能放在Community使用~

後記: 不知道有沒有鄉民跟我一樣好奇? 拿底下E5 2683 v3的洋垃圾來跑, 會不會秒殺啊?/images/emoticon/emoticon37.gif
https://ithelp.ithome.com.tw/upload/images/20171222/201033338XYnAWffHm.jpg


上一篇
Day03 - Microsoft R Open and R Tools for Visual Studio
下一篇
Day05 – 關於機器學習的二三事
系列文
Microsoft R Solution30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言