教學大綱 Syllabus

科目名稱:機器學習與其在行為科學之應用

Course Name: Machine Learning and its Applications in Behavioral Science

修別:選

Type of Credit: Elective

3.0

學分數

Credit(s)

40

預收人數

Number of Students

課程資料Course Details

課程簡介Course Description

「機器學習與其在行為科學之應用」乃為行為科學領域學生所設計之機器學習課程,除機器學習的基礎理論外,強調於其在行為科學之應用,以及機器學習模型之可解釋性與其如何協助因果推論。

本課程內容涵蓋以下三面向:

  1. 機器學習之基本概念,包括迴歸(regression)、分類(classification)、交叉效化(cross-validation)、正則化(regularization)、以及優化(optimization)。
  2. 常見之機器學習算則,包括線性方法(linear method)、K最近鄰居(K-nearest neighbors)、決策樹(decision tree)、集成學習(ensemble learning)、以及深度學習(deep learning)等。
  3. 解釋性與因果推論,包括排序特徵重要性(permutation feature importance)、偏相依圖(partial dependence plot)、SHAP(SHapley Additive exPlanations)、因果效果(causal effect)之估計、以及特徵重要性之檢定。

此外,本課程將使用 Python 的scikit-learn、PyTorch等開源軟體,以進行前述方法於行為資料之實作。由於授課地點為一般教室,故建議修課學生準備筆記型電腦,以方便課堂中即時操作回饋。

核心能力分析圖 Core Competence Analysis Chart

能力項目說明


    課程目標與學習成效Course Objectives & Learning Outcomes

    本課程假設學生具有基礎統計學之知識,以及願意學習Python程式設計之熱忱。盼望透過課程講授與實作,修課學生能夠具備以下之能力:

    1. 精熟機器學習的基本概念。
    2. 了解主流機器學習算則。
    3. 解釋學習模型甚至進行因果推論。
    4. 有品味地執行機器學習專案。

    每周課程進度與作業要求 Course Schedule & Requirements

    教學週次Course Week 彈性補充教學週次Flexible Supplemental Instruction Week 彈性補充教學類別Flexible Supplemental Instruction Type

    本課程規劃採用16+2之設計,以因應未來台聯大課制之變革。

    週次

    課程內容與指定閱讀

    教學活動/作業

    投入

    總時數

    1

    (2/20)

    課程概論

    Course Overview

    CH1-CH2 in ISLP

     

    9

    2

    (2/27)

    Python簡介

    WTOP/PDSH

    lab_python

    9

    3

    (3/6)

    自主學習

    Self-Directed Learning

    自行複習Python

    9

    4

    (3/13)

    線性迴歸

    Linear Methods for Regression

    CH3 in ISLP

    lab_regression

    9

    5

    (3/20)

    scikit-learn簡介

    Introduction to scikit-learn

    sklearn

    lab_sklearn

    9

    6

    (3/27)

    正則化與交叉檢驗

    Regularization and Cross-Validation

    CH5-CH6 in ISLP

    lab_reg_cv

    繳交HW1

    9

    7

    (4/3)

    校際活動週(停課)

     

    9

    8

    (4/10)

    線性分類

    Linear Methods for Classification

    CH4 in ISLP

    lab_classification

    9

    9

    (4/17)

    非線性與可解釋性

    Non-Linearity and Interpretability

    CH3.5 and 4.5 in ISLP

    CH8, CH16, CH17 in EMA

    SHAP

    lab_nl_int

    繳交HW2

    9

    10

    (4/24)

    樹為基之方法

    Tree-Based Methods

    CH8 in ISLP

    lab_tree

    9

    11

    (5/1)

    集成學習

    Ensemble Learning

    CH8 in ISLP/CH10 in ESL

    lab_ensemble

    繳交期末專案計畫

    9

    12

    (5/8)

    深度學習

    Deep Learning

    CH10 in ISLP

    lab_dl

    繳交HW3

    9

    13

    (5/15)

    期中考

    Midterm

     

    9

    14

    (5/22)

    進階深度學習

    Advanced Deep Learning

    lab_adl

    9

    15

    (5/29)

    因果推論

    Causal Inference

    CIM & DoubleML

    lab_causal

    9

    16

    (6/5)

    特徵重要性檢定

    Tests on Feature Importance

     

    9

    17

    (6/12)

    期末專案報告

    Final Project Presentation

    期末專案報告

    9

    18

    (6/19)

    自主學習

    Self-Directed Learning

    自行統整課程內容

    9

     

    授課方式Teaching Approach

    60%

    講述 Lecture

    20%

    討論 Discussion

    20%

    小組活動 Group activity

    0%

    數位學習 E-learning

    0%

    其他: Others:

    評量工具與策略、評分標準成效Evaluation Criteria

    1. 課堂參與(10%):根據修課同學之出席與討論進行評分。若無法出席請假規範請根據「國立政治大學學生請假規則」(https://osa.nccu.edu.tw/files/1957049172658e2f18b105d.pdf),於該週課程上課前透過學校之請假系統完成請假申請。
    2. 作業(30%):共3次,每次佔10%,以概念與資料分析實作為主。
    3. 期中考(30%):以概念之問答題為主,會事先公布大致之題庫。
    4. 期末小組專案報告(30%):以2-3人形成小組(組員皆為研究生的話,至多2人一組),進行機器學習之專案報告,於期末進行海報之展示(有可能跟AI中心合作)。專案可為實徵資料分析(需為人類產生之資料)或是方法學探究(如算則之比較、算則之改進等)。

    指定/參考書目Textbook & References

    本課程所使用之指定教材,其作者皆已於網路提供了免費之內容,而多數之參考資料亦可透過合法管道取得。

     

    指定書目

    James, G., Witten, D., Hastie, T, & Tibshirani, R., Taylor, J. (2023). An introduction to statistical learning: with applications in Python. Springer. (https://www.statlearning.com/, ISLP) (為此課程最主要的教科書)

    Hastie, T., Tibshirani, R., & Friedman, J. H. (2009). The elements of statistical learning: data mining, inference, and prediction (2nd ed). Springer. (https://web.stanford.edu/~hastie/ElemStatLearn/, ESL) (為ISLP的進階版本,著重在理論)

    Vanderplas, J. (2016). A Whirlwind Tour of Python. O'Reilly Media, Inc, USA. (https://github.com/jakevdp/WhirlwindTourOfPython, WTOP) (python教學使用)

    Vanderplas, J. (2016). Python Data Science Handbook. O'Reilly Media, Inc, USA. (https://jakevdp.github.io/PythonDataScienceHandbook/, PDSH) (python教學使用)

    蔡炎龍。成為python數據分析達人的第一門課(https://ctld.video.nccu.edu.tw/km/1399

    Biecek, P., & Burzykowski, T. (2020). Explanatory Model Analysis: Explore, Explain, and Examine Predictive Models. With examples in R and Python. (https://ema.drwhy.ai/, EMA) (模型解釋性使用)

    Cunningham, S. (2021). Causal Inference: The Mixtape. (https://www.scunning.com/mixtape.html, CIM) (介紹因果推論時使用)

    Lundberg, S. M. (2018). SHAP documentation. (https://shap.readthedocs.io/, SHAP) (套件文件)

    Bach, P., Chernozhukov, V., Kurz, M. S., and Spindler, M. (2022), DoubleML - An Object-Oriented Implementation of Double Machine Learning in Python. Journal of Machine Learning Research, 23(53), 1-6. (https://docs.doubleml.org/, DoubleML) (套件文件)

    Pedregosa, F., Varoquaux, Ga"el, Gramfort, A., Michel, V., Thirion, B., Grisel, O., … others. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830. (https://scikit-learn.org/, sklearn) (套件文件)

     

    參考書目

    Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W. and Robins, J. (2018), Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21, 1-68.

    Géron, A. (2022). Hands-on machine learning with Scikit-Learn, Keras and TensorFlow: concepts, tools, and techniques to build intelligent systems (3rd ed.). O’Reilly. (因此書未提供免費閱讀管道,故未列入指定教材,但極力推薦)

    Kuhn, M., & Johnson, K. (2013). Applied Predictive Modeling. Springer. (http://appliedpredictivemodeling.com/)

    Kuhn, M., & Johnson, K. (2020). Feature Engineering and Selection: A Practical Approach for Predictive Models. CRC Press. (http://www.feat.engineering/)

    Kuhn, M., & Silge, J. (2021). Tidy Modeling with R. (https://www.tmwr.org/)

    Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS'17). Curran Associates Inc., Red Hook, NY, USA, 4768–4777.

    Lundberg, S. M., Erion, G., Chen, H. et al. (2020). From local explanations to global understanding with explainable AI for trees. Nature Machine Intelligence, 2, 56–67.

    Molnar, C. (2021). Interpretable Machine Learning: A Guide for Making Black Box Models Explainable. (https://christophm.github.io/interpretable-ml-book/index.html)

    Stevens, E., Antiga, L., & Viehmann, T. (2020). Deep Learning with PyTorch. (https://www.manning.com/books/deep-learning-with-pytorch)

    James, D. (2018). Introduction to Machine Learning with Python: A Guide for Beginners in Data Science (1st. ed.). (因此書未提供免費閱讀管道,故未列入指定教材,但極力推薦,此書相當適合初學者)

     

    已申請之圖書館指定參考書目 圖書館指定參考書查詢 |相關處理要點

    書名 Book Title 作者 Author 出版年 Publish Year 出版者 Publisher ISBN 館藏來源* 備註 Note

    維護智慧財產權,務必使用正版書籍。 Respect Copyright.

    本課程可否使用生成式AI工具Course Policies on the Use of Generative AI Tools

    有條件開放使用:可請生成式AI協助撰寫程式碼,但請確認其正確性。 Conditional Permitted to Use

    課程相關連結Course Related Links

    
                

    課程附件Course Attachments

    課程進行中,使用智慧型手機、平板等隨身設備 To Use Smart Devices During the Class

    需經教師同意始得使用 Approval

    列印