MATLAB Progamming for
Machine Learning (Graduate)

Compulsory Course for the Undergraduate Students
Lecturer: Chia-Feng Lu (alvin4016@nycu.edu.tw)
Matlab進階程式設計與專題實作 (碩博班)
授課教師: 盧家鋒、吳育德

教學目標 Objectives

本課程將以MATLAB程式語言初探機器學習的核心概念與應用實作,在修課學生有基本MATLAB語法認識的前提下,本課程將從機器學習的概念介紹、迴歸模型、資料分類辨識、捲積神經網路到模型選取與驗證,進行相關理論基礎介紹並輔以MATLAB實例練習進行示範實作。本課程參與學生,也將以本課程學習之內容,進行專題實作,可以線上取得之資料抑或是自身研究主題進行演練,以提升學生對電腦科學、機器學習的興趣,且協助其未來於專業科目上的應用發展。

分組名單登錄 Group Registration

Click here to register; Final group list

Miro Co-creation Link

連結請點我

上課教室 Classroom

圖資大樓402室

授課內容Contents

Week 1:課程簡介 Course introduction
[課程講義]Lesson1_slides.pdf
[Matlab安裝說明]說明文件
[課程影片]請調整為1080p解析度觀看
2021重錄版
(1) Course Introduction (1:10:52)

2020版
(1) Course Introduction (49:10)

Week 2:機器學習介紹 An overview of machine learning
[課程講義]Lesson2_slides.pdf
[參考資料]
1. Machine Learning with MATLAB, MathWorks
2. Machine Learning for Sensor Data Analytics, MathWorks
[第二段課程範例資料]Matlab 2019b以後版本或是MAC使用者,請點選聯結下載 Download Example Data
(Original data from Gabriele Bunkheila, MathWorks)
[課程影片]請調整為1080p解析度觀看
2021重錄版
(1) General Concepts of Machine Learning (49:45)
(2) Machine Learning Workflow - An Example (49:59)

2020版
(1) General Concepts of Machine Learning (1:02:20)
(2) Machine Learning Workflow - An Example (43:54)

Week 3: MATLAB資料存放結構 Representation of data for machine learning
[課程講義]Lesson3_slides.pdf
[課程資料]Materials_L3.zip
[參考資料]Textbook 2 - Ch. 2
[課程影片]請調整為1080p解析度觀看
(1) MATLAB Data Types (1:33:34)
(2) Datastore and Table Usage: A Short Example (16:06)

Week 4:非監督式學習 Unsupervised learning: clustering
[課程講義]Lesson4_slides.pdf
[課程資料]Materials_L4.zip
[參考資料]Textbook 1 - Ch. 6, Textbook 3 - Ch. 10
[課程影片]請調整為1080p解析度觀看
(1) Unsupervised Learning: Hard Clustering (1:20:39)
(2) Unsupervised Learning: Soft Clustering (29:02)

Week 5:迴歸分析 Parametric and nonparametric regression
[課程講義]Lesson5_slides.pdf
[課程資料]Materials_L5.zip
[參考資料]Textbook 3 - Ch. 3 & 8.1
[課程影片]請調整為1080p解析度觀看
(1) Parametric Regression (53:14)
(2) Nonparametric Regression: Regression Tree (1:09:13)

Week 6:機率分類器 Classification: probabilistic classifiers
[授課老師]吳育德教授
[課程講義]Lesson6_slides_ytwu.pdf
[課程資料]Materials_L6.zip
[參考資料]Textbook 1 - Ch. 3 & 5
[課程影片]請調整為1080p解析度觀看
(1) Probabilistc classifiers (1:10:06)

Week 7: 決策樹分類器 Classification: tree-based methods
[授課老師]盧家鋒老師
[課程講義]
Lesson7_slides.pdf
[課程資料]Materials_L7.zip
[參考資料]Textbook 3 - Ch. 8
[課程影片]請調整為1080p解析度觀看
(1) Classification tree (1:00:00)
(2) Bagging, random forest, boosting (40:23)

[授課老師]吳育德教授
[課程講義]
Lesson7_slides_ytwu.pdf
[課程資料]Materials_L7.zip
[參考資料]Textbook 1 - Ch. 5, Textbook 2 - Ch. 7, Textbook 3 - Ch. 8
[課程影片]請調整為1080p解析度觀看
(1) Tree-based methods (49:06)
(2) Bagging trees (20:51)

Week 8: 支持向量機 Classification: support vector machines
[授課老師]盧家鋒老師
[課程講義]
Lesson8_slides.pdf
[課程資料]Materials_L8.zip
[參考資料]Textbook 3 - Ch. 9
[課程影片]請調整為1080p解析度觀看
(1) Support vector machines (1:37:22)

[授課老師]吳育德教授
[課程講義]
Lesson8_slides_ytwu.pdf
[課程資料]Materials_L8.zip
[參考資料]Textbook 1 - Ch. 5, Textbook 3 - Ch. 9
[課程影片]請調整為1080p解析度觀看
(1) Support vector machine - part I(55:56)
(2) Support vector machine - part II (49:22)

Week 9: MATLAB App設計介面 Graphic User Interface: App designer
[課程講義]Lesson9_slides.pdf
[課程資料]Materials_L9.zip
[課程影片]請調整為1080p解析度觀看
(1) Introduction of App Designer (1:06:25)
(2) Advanced Usages of App Designer (49:25)

 

Week 10: 神經網路 neural networks
[授課老師]盧家鋒老師
[課程講義]
Lesson10_slides.pdf
[課程資料]Materials_L10.zip
[參考資料]Textbook 5 - Ch. 2 & 3

[課程影片]請調整為1080p解析度觀看
(1) Neural Network (1:00:40)
(2) Multi-Layer Neural Network (42:07)

[授課老師]吳育德教授
[課程講義]Lesson10_slides_ytwu.pdf
[課程資料]Materials_L10.zip
[參考資料]Textbook 5 - Ch. 2 & 3
[課程影片]請調整為1080p解析度觀看
(1) Neural Network I (50:14)
(2) Neural Network II (39:20)
(3) Neural Network III (21:21)

Week 11: 深度學習與捲積神經網路 Deep Learning & CNN
[授課老師]盧家鋒老師
[課程講義]
Lesson11_slides.pdf
[課程資料]Materials_L11.zip
[參考資料]Textbook 5 - Ch. 5 & 6
[課程影片]
請調整為1080p解析度觀看
(1) Deep Learning (1:04:06)
(2) Convolutional Neural Network (42:28)

[授課老師]吳育德教授
[課程講義]
Lesson11_slides.pdf
[課程資料]Materials_L11.zip
[參考資料]Textbook 5 - Ch. 5 & 6
[課程影片]請調整為1080p解析度觀看
(1) Convolutional Neural Network I (1:02:10)

Week 12: 深度網路設計介面Deep Network Designer
[注意事項]
1.顯示卡配置: 欲使用MATLAB中的GPU運算相關的toolbox, 其顯示卡運算能力compute capability (c.c) 需大於3.0 ,GTX10系列(Pascal: 6.x)與 RTX20系列(Turing: 7.x )皆高於3.0。 若不確定,可以前往nvidia官網查詢做 https://developer.nvidia.com/cuda-gpus 。
(若不想查也不知道顯卡型號 MATLAB 2021a 可使用matlab指令gpuDevice查詢,https://www.mathworks.com/help/parallel-computing/parallel.gpu.gpudevice.html)
2.建議需安裝之MATLAB工具箱: https://www.mathworks.com/support/requirements/deep-learning-toolbox.html
3.CUDA &CuDNN版本: 若使用MATLAB 2019b以後版本,不需要額外安裝任何CUDA安裝包以及CuDNN,確定顯示卡的驅動程式及第2項中的工具包已安裝,便可在MATLAB中直接呼叫GPU做深度學習使用。
[授課老師]盧家鋒老師
[課程講義]
Lesson12_slides.pdf
[課程資料]Materials_L12.zip
[參考資料]Matlab Deep Learning Userguide
[課程影片]請調整為1080p解析度觀看
(1) MATLAB Deep Network Designer (1:14:20)
(2) Script for Constructing Deep Network (26:42)

[授課老師]吳育德教授
[課程講義]
Lesson12_slides.pdf
[課程資料]Materials_L12.zip
[參考資料]Textbook 2 - Ch. 10
[課程影片]請調整為1080p解析度觀看
(1) MATLAB Deep Learning (1:47:03)

Week 13: 深度學習應用範例 Deep Learning Applications
[作業環境]為能使用最新深度學習架構,建議安裝最新版本Matlab (目前最新版為R2022a)
[課程講義]Lesson13_slides.pdf
[課程資料]Materials_L13.zip
[課程影片]請調整為1080p解析度觀看
(1) Matlab Deep Learning Resources (29:06)
(2) Object Detection using YOLOv3 (1:14:37)
(3) Image Segmentation Using U-Net (56:45)
[應用範例與相關資料]
請按照自己應用需求參照以下頁面學習各項應用類型(image segmentation, object detection, image translation-GAN, signal processing, text analysis)
(1) Data Sets and Examples for Deep Learning
(2) Pretrained Deep Neural Networks
(3) List of Deep Learning Layers
(4) Get Started with the Image Labeler
(5) Get Started with GANs for Image-to-Image Translation

Week 14: 模型驗証 Resampling methods and model validation
[課程講義]
Lesson14_slides.pdf
[課程資料]Materials_L14.zip
[參考資料]Textbook 3 - Ch. 5
[課程影片]請調整為1080p解析度觀看
(1) Cross Validation (52:22)
(2) Bootstrap (37:43)

Week 15: 期末專題實作報告 Final Report
[Padlet] Padlet link
[Reports]
1. 10 minutes per group + 5 minutes for discussion and Q&A
2. Please include the following information in your report
(1) Objectives and division of work
(2) Dataset
(3) Machine learning method and main content of the code
(4) Demonstration of App use (data input/presentation, machine learning parameters setting/training, performance evaluation)
(5) Discussion: Problems encountered and solutions, follow-up improvement and application
[Notes]
1. The final report will be treated as a final exam, and those who do not attend will receive a failing grade.
2. After the report, please submit the presentation slides, App files, and usage data set (if the data is internal to the lab, please do not provide them) to the teacher's mailbox within one week (by 6/9). If the report is not submitted, the final grade will be calculated at 60%.

[報告方式]
1. 每組報告時間約10分鐘+5分鐘討論問答
2. 報告內容請包含:
(1) 專題目標、分工表
(2) 使用資料集
(3) 機器學習方法與程式碼主要內容說明
(4) App使用示範 (資料輸入/呈現、機器學習參數設定/訓練、表現結果評估)
(5) 討論:遭遇問題與解決方法、後續改善與應用
[注意事項]
1. 期末報告視同期末考,未出席者成績以不及格計算
2. 報告完後,請於一周內(6/9前)將報告投影片、App檔案、使用資料集(如為實驗室內部資料可不用提供)繳交至老師信箱。未繳者,期末成績以60%計算。

Week 16: 期末專題實作報告 II

Week 17:機器學習應用討論I

Week 18:機器學習應用討論II

 

課程參考資料

[Textbook 1]
教科書名:A First Course in Machine Learning, 2nd edition, 2017
作  者:Simon Rogers, Mark Girolami
出 版 社:CRC Press
線上資源:https://github.com/sdrogers/fcmlcode

[Textbook 2]
教科書名:MATLAB Machine Learning Recipes, 2nd edition, 2018
作  者:Michael Paluszek, Stephanie Thomas
出版社:Apress
線上資源:https://github.com/Apress/matlab-machine-learning-recipes

[Textbook 3]
教科書名:An Introduction to Statistical Learning, 2nd edition, 2013
作  者:Gareth James, Daniela Witten, Trevor Hastie, Robert Tibshirani
出版社:Springer

[Textbook 4]
教科書名:A Concise Introduction to Machine Learning, 2020
作  者:A. C. Faul
出版社:CRC Press

[Textbook 5]
教科書名:MATLAB Deep Learning With Machine Learning, Neural Networks and Artificial Intelligence, 2017
作  者:Phil Kim
出版社:Apress

完整播放清單

連結至YouTube