SlideShare a Scribd company logo
1 of 150
Download to read offline
AI Overview
Taka Wang
2020/02/26
思辨能
力
與理性思考
過度期望的
高
峰階段
泡沫化的
谷
底階段
穩步爬升的
光明階段
實質
生
產的
高
峰階段
科技創新的
啟動階段
時間
能
見
度
5~10年
工
作經驗的資料科學家
Source: Where do Data Science experts exists?
深度學習等於
人
工
智慧
TensorFlow等於深度學習
人
工
智慧等於很多GPU
Credit
A little learning is a dangerous thing
- Alexander Pope
Source: Prowess
Credit
機器學習就是
一
些類神經網路
Source: Neural Network Zoo
不喜歡數學
所以
人
工
智慧與我無關
最佳化求解問題
數學符號只是
一
種精簡
又
精確的
方
法
表達某
人
的直覺之躍 - Terence Parr
人
工
智慧並不困難
從
小
學就要學習
人
工
智慧
我也準備轉
行
當資料科學家
六
行
程式寫出
人
臉辨識應
用
Source: ageitgey / face_recognition
Source: Train Object Detection AI with 6 lines of code
Source: Eyenet
別
人
的專業有這麼容易速成?
你覺得統計系就是在學這些?
Artificial intelligence is
actually statistics, but it uses
a very gorgeous rhetoric,
which is actually statistics
Thomas J. Sargent,
Nobel Prize 2011
遷移式學習是萬靈丹
雲端
大
廠紛紛推出AutoML
工
具
我們也應該投入NAS(類神經網路架構 動搜尋)
https://www.youtube.com/watch?v=kSa3UObNS6o&t=1674s
Source: statista.com
Source: statista.com
人
工
智慧將會取代
人
類
Source: NYTimes
Source: keplerlounge
Source: keplerlounge
Source: keplerlounge
~1500 machine
4TPU/machine
3 days
$US 2 million
~1300 machine
4TPU/machine
40 days
$US 20 million
無
人
駕駛還會出事故
Source: SAE International
純粹
人
員駕駛,無任何輔助
人
類為主,電腦提供輔助 電腦駕駛為主,
人
類輔助駕駛
基本
自
動駕駛,
人
類應急處理
高
度
自
動駕駛,
人
類仍可參與 完全
自
動駕駛,
人
類純粹乘坐
為什麼
大
廠都開源他們的
工
具
More data beats clever algorithms
but better data beats more data
Peter Norvig,
Director of research at Google Inc.
Break
Source: Nvidia
人工智慧歷史的演進
Rule-Based
寫
一
隻程式,分辨圖片內是不是貓
Rule-Based
寫
一
隻程式,分辨圖片內是不是貓
Rule-Based
寫
一
隻程式,分辨圖片內是不是貓
如果耳朵 = 2
且腳 = 4
且尾巴 = 1
且牙
齒
= 30
…..
回傳這是貓
Rule-Based
寫
一
隻程式,分辨圖片內是不是貓
如果耳朵 = 2
且腳 = 4
且尾巴 = 1
且牙
齒
= 30
…..
回傳這是貓
這是貓
用
窮舉法列出所有規則
IBM Watson
Source:
人
工
智慧新
革
命--超級電腦「華
生
」
IBM Watson
• 90台 Server
• 2880顆 CPU
• 灌入2億
頁
的內容
• 600萬條規則
• 3秒內回答問題
Source:
人
工
智慧新
革
命--超級電腦「華
生
」
Machine Learning
Machine Learning
Machine Learning
機器學習演算法
Machine Learning
機器學習演算法 貓的模型
Machine Learning
機器學習演算法 貓的模型
Machine Learning
機器學習演算法 貓的模型
這是貓
貓的模型
Source: XKCD
What is Training/Learning
Source: GIPHY
What is Training/Learning
Source: GIPHY
Source:
人
工
智慧
大
歷史
80年代學術界的共識
多層神經網路是沒有前途的死胡同
事實
多深才叫做深層網路
How Deep is Deep
人
工
智慧的第三次復興
Nvidia GPU
2006
Deep Learning on
Speech Recognition
2012
ImageNet
1500 萬張圖片,涵蓋 22,000 種類別
2012
2014
2016
2018
More Applications
More Applications
Source: The GAN Zoo
CycleGAN
StyleGAN 2
CycleGAN
StyleGAN 2
Beyond Deep Learning
Don't throw away the needle
when you get a sword
- Hindi couplet
https://youtu.be/_sBBaNYex3E
https://youtu.be/_sBBaNYex3E
https://youtu.be/tlOIHko8ySg
https://youtu.be/tlOIHko8ySg
Source: The State of Computer Vision and AI: we are really, really far away
Real World Problems
Source
Source
Source: SAS
Source: SAS
Source:
高
工
局網站
Decision Tree 決策樹
Decision Tree (決策樹)
天氣 溫度 濕度 有風 打球嗎
1 晴天 85 85 沒有 不打
2 晴天 80 90 有 不打
3 陰天 83 78 沒有 打
4 雨天 70 96 沒有 打
5 雨天 68 80 沒有 打
6 雨天 65 70 有 不打
7 陰天 64 65 有 打
8 晴天 72 95 沒有 不打
9 晴天 69 70 沒有 打
10 雨天 75 80 沒有 打
11 晴天 75 70 有 打
12 陰天 72 90 有 打
13 陰天 81 75 沒有 打
14 雨天 71 80 有 不打
Source: Wiki
高
爾夫球場,
人
員管理問題
Decision Tree (決策樹)
天氣 溫度 濕度 有風 打球嗎
1 晴天 85 85 沒有 不打
2 晴天 80 90 有 不打
3 陰天 83 78 沒有 打
4 雨天 70 96 沒有 打
5 雨天 68 80 沒有 打
6 雨天 65 70 有 不打
7 陰天 64 65 有 打
8 晴天 72 95 沒有 不打
9 晴天 69 70 沒有 打
10 雨天 75 80 沒有 打
11 晴天 75 70 有 打
12 陰天 72 90 有 打
13 陰天 81 75 沒有 打
14 雨天 71 80 有 不打
天氣
(9/5)
濕度
(2/3)
有風
打球
(4/0)
陰天 雨天
晴天
打球
(3/0)
不打
(0/2)
打球
(2/0)
不打
(0/3)
<=70 >70 有 沒有
Source: Wiki
高
爾夫球場,
人
員管理問題
# imports
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
# prepare dataset
iris = load_iris()
X = iris.data
Y = iris.target
# split
seed = 7
test_size = 0.33
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=test_size, random_state=seed)
# training
model = DecisionTreeClassifier(max_depth=2)
model.fit(X_train, y_train)
# prediction
y_pred = model.predict(X_test)
predictions = [round(value) for value in y_pred]
# evaluation
accuracy = accuracy_score(y_test, predictions)
print("Accuracy: %.2f%%" % (accuracy * 100.0))
Ensemble Method
Source: General Ensemble Method
Random Forest (隨機森林)
Random Forest (隨機森林)
天氣 溫度 濕度 有風 打球嗎
1 晴天 85 85 沒有 不打
2 晴天 80 90 有 不打
3 陰天 83 78 沒有 打
4 雨天 70 96 沒有 打
5 雨天 68 80 沒有 打
6 雨天 65 70 有 不打
7 陰天 64 65 有 打
8 晴天 72 95 沒有 不打
9 晴天 69 70 沒有 打
10 雨天 75 80 沒有 打
11 晴天 75 70 有 打
12 陰天 72 90 有 打
13 陰天 81 75 沒有 打
14 雨天 71 80 有 不打
Random Forest (隨機森林)
天氣 溫度 濕度 有風 打球嗎
1 晴天 85 85 沒有 不打
2 晴天 80 90 有 不打
3 陰天 83 78 沒有 打
4 雨天 70 96 沒有 打
5 雨天 68 80 沒有 打
6 雨天 65 70 有 不打
7 陰天 64 65 有 打
8 晴天 72 95 沒有 不打
9 晴天 69 70 沒有 打
10 雨天 75 80 沒有 打
11 晴天 75 70 有 打
12 陰天 72 90 有 打
13 陰天 81 75 沒有 打
14 雨天 71 80 有 不打
天氣 溫度 溫度 濕度 濕度 有風 溫度 有風
部分特徵
Random Forest (隨機森林)
天氣 溫度 濕度 有風 打球嗎
1 晴天 85 85 沒有 不打
2 晴天 80 90 有 不打
3 陰天 83 78 沒有 打
4 雨天 70 96 沒有 打
5 雨天 68 80 沒有 打
6 雨天 65 70 有 不打
7 陰天 64 65 有 打
8 晴天 72 95 沒有 不打
9 晴天 69 70 沒有 打
10 雨天 75 80 沒有 打
11 晴天 75 70 有 打
12 陰天 72 90 有 打
13 陰天 81 75 沒有 打
14 雨天 71 80 有 不打
天氣 溫度 溫度 濕度 濕度 有風 溫度 有風
部分特徵
一
堆專家
Random Forest (隨機森林)
天氣 溫度 濕度 有風 打球嗎
1 晴天 85 85 沒有 不打
2 晴天 80 90 有 不打
3 陰天 83 78 沒有 打
4 雨天 70 96 沒有 打
5 雨天 68 80 沒有 打
6 雨天 65 70 有 不打
7 陰天 64 65 有 打
8 晴天 72 95 沒有 不打
9 晴天 69 70 沒有 打
10 雨天 75 80 沒有 打
11 晴天 75 70 有 打
12 陰天 72 90 有 打
13 陰天 81 75 沒有 打
14 雨天 71 80 有 不打
天氣 溫度 溫度 濕度 濕度 有風 溫度 有風
部分特徵
一
堆專家
多數決
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
6
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
6 相差4
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
6 相差4
3
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
6 相差4
3 相差1
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
6 相差4
3 相差1
1
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
6 相差4
3 相差1
1 相差0
Gradient Boost
假設某
人
今年30歲,
用
GBM來猜測他的年齡
20 相差10
6 相差4
3 相差1
1 相差0
# imports
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
# prepare dataset
iris = load_iris()
X = iris.data
Y = iris.target
# split
seed = 7
test_size = 0.33
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=test_size, random_state=seed)
# training
model = DecisionTreeClassifier(max_depth=2)
model.fit(X_train, y_train)
# prediction
y_pred = model.predict(X_test)
predictions = [round(value) for value in y_pred]
# evaluation
accuracy = accuracy_score(y_test, predictions)
print("Accuracy: %.2f%%" % (accuracy * 100.0))
# imports
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
# prepare dataset
iris = load_iris()
X = iris.data
Y = iris.target
# split
seed = 7
test_size = 0.33
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=test_size, random_state=seed)
# training
model = DecisionTreeClassifier(max_depth=2)
model.fit(X_train, y_train)
# prediction
y_pred = model.predict(X_test)
predictions = [round(value) for value in y_pred]
# evaluation
accuracy = accuracy_score(y_test, predictions)
print("Accuracy: %.2f%%" % (accuracy * 100.0))
model = XGBClassifier()
from xgboost import XGBClassifier
Titanic Dataset
Kaggle Notebooks
20200226 - AI Overview
20200226 - AI Overview

More Related Content

More from Jamie (Taka) Wang

More from Jamie (Taka) Wang (20)

20220113_product_day
20220113_product_day20220113_product_day
20220113_product_day
 
20200429_software
20200429_software20200429_software
20200429_software
 
20200602_insight_business
20200602_insight_business20200602_insight_business
20200602_insight_business
 
20200408_gen11_sequence_diagram
20200408_gen11_sequence_diagram20200408_gen11_sequence_diagram
20200408_gen11_sequence_diagram
 
20190827_activity_diagram
20190827_activity_diagram20190827_activity_diagram
20190827_activity_diagram
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
20161220 - microservice
20161220 - microservice20161220 - microservice
20161220 - microservice
 
20160217 - Overview of Vortex Intelligent Data Sharing Platform
20160217 - Overview of Vortex Intelligent Data Sharing Platform20160217 - Overview of Vortex Intelligent Data Sharing Platform
20160217 - Overview of Vortex Intelligent Data Sharing Platform
 
20151111 - IoT Sync Up
20151111 - IoT Sync Up20151111 - IoT Sync Up
20151111 - IoT Sync Up
 
20151207 - iot strategy
20151207 - iot strategy20151207 - iot strategy
20151207 - iot strategy
 
20141210 - Microservice Container
20141210 - Microservice Container20141210 - Microservice Container
20141210 - Microservice Container
 
20161027 - edge part2
20161027 - edge part220161027 - edge part2
20161027 - edge part2
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Entities in DCPS (DDS)
Entities in DCPS (DDS)Entities in DCPS (DDS)
Entities in DCPS (DDS)
 
20161125 gostation
20161125 gostation20161125 gostation
20161125 gostation
 
20160420 - git intro
20160420 - git intro20160420 - git intro
20160420 - git intro
 
20170104 - transaction_pattern
20170104 - transaction_pattern20170104 - transaction_pattern
20170104 - transaction_pattern
 
20161220 - domain-driven design
20161220 - domain-driven design20161220 - domain-driven design
20161220 - domain-driven design
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 

20200226 - AI Overview