Real-World Applications of Supervised Learning
摘要
This chapter demonstrates the application of supervised learning models to a larger simulated dataset that incorporates demographic, clinical, behavioral, and genetic risk factors to predict substance use disorder outcomes. Using RStudio, readers are guided through key steps including data preparation, feature selection, model construction, and evaluation. Methods such as logistic regression, decision trees, and random forests are introduced in detail, allowing learners to compare model performance across multiple approaches. Performance is assessed using accuracy and related metrics, highlighting the strengths and limitations of each method. ChatGPT is integrated as a coding assistant, helping to generate R scripts, resolve errors, and produce visualizations, thereby lowering technical barriers for beginners. By working with the same dataset across different algorithms, the chapter illustrates practical applications of predictive analytics in public health, with special attention to fairness, interpretability, and the responsible use of machine learning for sensitive health outcomes.