Supervised Learning I: Classification Models
摘要
This chapter introduces supervised machine learning (ML) with emphasis on how labeled datasets are used to train and evaluate predictive models. Core concepts such as splitting data into training and testing sets, and assessing model performance through metrics like accuracy, sensitivity, specificity, and the confusion matrix, are carefully explained. Using built-in datasets in R, learners are guided through practical examples of classification algorithms, including logistic regression, decision trees, and random forests. ChatGPT is integrated as a coding assistant to support code generation, debugging, and conceptual clarification, making the learning process more accessible. The chapter also explores real-world applications in disease prediction and population health management, showing how ML can inform evidence-based decision-making. Finally, issues of interpretability, overfitting, and algorithmic bias are addressed, offering practical guidance for developing responsible and transparent models in public health research and practice.