Use the Taoyuan City government to
provide open data and use data
science methods for predictive analysis
邹嘉骏 Jacky Zou
(大中華)台灣微軟資料科學應用者[專案研究員]
jackycj0830@gmail.com
國立中央大學通訊工程學系研究所(主攻物聯網、機器學習、人工智慧)
1
大綱
• 前言:智慧城市、大數據
• 應用領域
• 應用方法(開放數據、分析工具)
• 分析與預測
• 結語
2
前言-城市演進趨勢
• 全球人口快速成長並大量集中至城市,衍生出嚴重的能
源/環境/交通/治安等議題亟待解決。
3
智慧化:連結、洞察、預測
4
大數據的本質是什麼?
5
IoT物聯網框架與大數據洞察
6
應用領域:善用物聯網與大數據發展智慧城市
7
應用數據:桃園市政府開放資料OData
https://data.tycg.gov.tw/
8
Odata流通與運用過程
9
應用方法:資料科學研究學習流程
10
什麼是機器學習
• 機器學習(Machine Learning)是計算機科學的一門。
• 常利用着統計學的技巧,機器學習程式(Machine Learning
Algorithms)能夠自動學習識別數據內的規律。憑着機器學習找
到的規律,電腦程式能作出高度準確的預測。
• Using known data, develop a model to predict unknown data.
Known Data: Big enough archive, previous observations, past data
Unknown Data: Unseen, not existing, future data
Model: Known data + Algorithms (ML algorithms)
11
12
Azure Machine Learning Service
Data -> Predictive model -> Operational web API in minutes
Blobs and Tables
Hadoop (HDInsight)
Relational DB (Azure SQL DB)
Data Clients
Model is now a web
service that is callable
Monetize the API through
our marketplace
API
Integrated development
environment for Machine
Learning
ML STUDIO
14
Common Classes of Algorithms
(Supervised|Unsupervised)
Classification Regression Anomaly
Detection
Clustering
異質檢測迴歸分群分類
機器學習流程 Acquire Data
Understand
Data
Select
"Relevant" Data
Develop model
Experiment and
Evaluate
Operate and
Monitor
哪個環節是在機器
學習當中最為重要
的項目?
Data ?
Model ?
Result or Predict ?
分群
迴歸
分類
Machine Learning
分類
推估
分群
監督式學習 非監督式學習
50°F 30°F 68°F 95°F1990
48°F 29°F 70°F 98°F2000
49°F 27°F 67°F 96°F2010
? ? ? ?2020
… … … ……
Known data
Model
Unknown data
Weather forecast sample
Using known data, develop a model to predict unknown data.
Model (Regression)
90°F
-26°F
50°F 30°F 68°F 95°F1990
48°F 29°F 70°F 98°F2000
49°F 27°F 67°F 96°F2010
Using known data, develop a model to predict unknown data.
Predict 2020 Summer
機器學習的優點
• 資料科學流程可以使用視覺結構方式呈現
20
Azure ML的重點在於快速創造模型
• 以視覺結構方式呈現
• • 省下大量時間做黑手的工作
• • 有更充分的時間與精力在找出Key features
• • 減少debug時間
• • 邏輯清楚易讀,交接交手方便
• 以快速的實驗來創造更棒的模型。
21
“”
Azure Machine
Learning Studio
22
Start here:
studio.azureml.net
Project/
Modules
Machine
Learning
Algorithms
Custom
Modules
Clean data
Data IO
R/Python
Support
Region &
Workspace
Create
Module/Exp/Proj
ect …
Run, Publish,
etc
Azure ML interface
Description
…
Azure ML 功能類別
• Data Format conversions
• Feature Selection
• Machine Learning
• OpenCV Library Modules
• R Language Modules
• Python Language Modules
• Statistical Functions
• Text Analytics
• Time Series
Anomaly
detection
algorithms
Classification
algorithms
Clustering
algorithms
Regression
algorithms
Import data to Azure ML
• Upload local file and use saved
dataset
• Import data via online data source
• Import data via SQL Database
• Use output from other experiment
Export data from Azure ML
• Visualize data/output
• Save as Dataset
• Download to local
• Open in Notebook
• Export Data to Hive Query, Azure SQL
Database, Azure Table, Blob Storage
Azure ML Modules
• Azure ML modules
• Execute R/Python Script
• Imported custom modules (R)
Create Custom Modules (R) (Web view)
Machine Learning Algorithm
Taoyuan Open Data & Azure Machine Learning
Demo
AML Sample Model
30
ML Experiment Workflow
Input data
Data Transformation
Train Model
Define Model Split Data
Score (prediction)
Evaluate Model
31
Raw Data
32
https://data.tycg.gov.tw/opendata/datalist/
datasetMeta/resource?oid=e46ace4d-
3703-464e-ad77-
882af866f987&rid=f34c62fe-349c-45f9-
9397-aa0f150ca254
ML Experiment Workflow
Input data
Data Transformation
Train Model
Define Model Split Data
Score (prediction)
Evaluate Model
33
Select Columns in Dataset
34
ML Experiment Workflow
Input data
Data Transformation
Train Model
Define Model Split Data
Score (prediction)
Evaluate Model
35
Model Training
36
Evaluation
37
https://zh.wikipedia.org/wiki/%E5%86%B3%E5%
AE%9A%E7%B3%BB%E6%95%B0
結論
Garbage in, Gold out
推薦參考書籍
39
建Model撈Data 學Method
同場加映
• 當ML建立完model並有過去與未來預測數據,如何將數據圖型化
以報告或說服主管或大眾?
微軟有推出一套工具PowerBI,可將數據圖型化表示。
Report 106553012 - copy

Report 106553012 - copy