前言
我們來做 How Google does Machine Learning 的第二個lab~
這次鐵人賽的30天中,我目前所寫文章的所有課程目錄如下:
- 【Day 1】準備日 – 註冊coursera與訂閱課程
- Course – How Google does Machine Learning
- Chapter 1 – Introduction to specialization
- Chapter 2 – What it means to be AI first
- Chapter 3 – How Google does ML
- Chapter 5 – Python notebooks in the cloud
Course – How Google does Machine Learning
第五章節的課程地圖:(紅字標記為本篇文章中會介紹到的章節)
* Python notebooks in the cloud
* Module Introduction
* Cloud Datalab
* Cloud Datalab
* Demo: Cloud Datalab
* Development process
* Demo of rehosting Cloud Datalab
* Working with managed services
* Computation and storage
* Lab: Rent-a-VM
* Intro to Qwiklabs
* Intro to Renting-VM Lab
* Lab: Rent-a-VM to process earthquake data
* Lab debrief
* Cloud Shell
* Third wave of cloud
* Third Wave of Cloud: Fully-Managed Services
* Third Wave of Cloud: Serverless Data Analysis
* Third Wave of Cloud: BigQuery and Cloud Datalab
* Datalab and BigQuery
* Lab Intro: Analyzing data using Datalab and BigQuery
* Lab: Analyzing data using Datalab and BigQuery
* Lab Debrief: Analyzing Data using Datalab and BigQuery
* Machine Learning with Sara Robinson
* ML, not rules
* Pre-trained ML APIs
* Vision API in action
* Video intelligence API
* Cloud Speech API
* Translation and NL
* Lab: Machine Learning APIs
* Lab: Pretrained ML APIs Intro
* Lab: Invoking Machine Learning APIs
* Lab Solution
Lab: Analyzing Data using Datalab and BigQuery
課程地圖
* Python notebooks in the cloud
* Datalab and BigQuery
* Lab Intro: Analyzing data using Datalab and BigQuery
* Lab: Analyzing data using Datalab and BigQuery
* Lab Debrief: Analyzing Data using Datalab and BigQuery
在這個lab中,我們將使用BigQuery去分析7000萬行左右的資料,
並將結果以幾十行的Pandas DataFrame輸出。
再來我們可以直接使用Pandas DataFrame的結果作資料視覺化。
註:
BigQuery
= 大量資料分析工具
在這裡我們只需要數秒鐘就可以創建圖形,這是使用其他方法可能做不到的。
然而,在互動式的開發流程中我們會很需要即時的分析,
對於大量資料的處理來說,這樣的速度是重要的,
你可能會想說,那就不要處理這麼多資料就好了啊?
問題是,如果我們處理的資料量小,這就不會是個好的 machine learning practice的範例了。
統計方法 與 machine learning 的關鍵差別?
另外一件事情是,我們想順便討論 統計方法 與 machine learning 的關鍵差別,
關於我們如何處理離群值。
在統計方法中,我們會傾向移除離群值。
但在 machine learning 中,離群值也會是我們學習的內容。
而且如果要學習離群值,我們也必須要有足夠的離群值資料,
我們還需要確保這些離群值在資料集中被分配,做好管理完整dataset的工作就顯得重要。
在這個實驗中我們提供了BigQuery能幫助你管理大量的dataset,
然後能替我們帶來更習慣的資料結構(例如:Pandas),
我們也可以使用python的繪圖工具製圖,就是我們這個lab的主要內容。
part 0 : (事前準備) 開啟 GCP console
請先參考 【Day 9】- 每次在google雲端上開始lab前都要的事前準備與注意事項 的內容,完成到運行中階段。
part 1 : (建立機器) 建立 Datalab VM
Step 0 : 打開 Cloud Shell