Scikit-learn is a Python library for data preparation, predictive modeling, and machine learning. It is especially useful when the goal is accurate prediction rather than detailed explanation of individual predictors. section 9.3.2
A typical predictive workflow uses scikit-learn to:
- Split data into training and testing sets, fit the model only on training data, and predict outcomes for unseen test data. section 9.3.2
- Compare training and test performance using metrics such as R-squared and root mean squared error (RMSE). Similar results suggest better generalization. section 9.3.2
- Choose from a broad collection of algorithms and evaluation metrics, while recognizing that statsmodels provides more comprehensive predictor summaries for explanatory modeling. section 9.3.2




