Build A Regression Prediction Model
Walks from a target variable, candidate predictors, dataset size, and analysis purpose through a full regression build: exploratory relationships, feature selection, model choice with reasoning, assumption checks, and performance metrics like R², RMSE, or AUC depending on the target type. Delivers plain-language coefficient interpretation, residual analysis, and sample predictions with confidence intervals, plus complete scikit-learn or statsmodels code.
Build a regression model that predicts {target_variable} from my dataset. Target variable: {target_details} Potential predictors: {predictor_columns} Dataset size: {row_count} Purpose: {analysis_purpose} Take me through: 1. Exploratory analysis of predictor-target relationships 2. Feature selection (which predictors to keep and why) 3. Building the model (linear, logistic, or polynomial — with reasoning for the choice) 4. Checking assumptions (linearity, independence, homoscedasticity, normality of residuals) 5. Performance metrics (R², adjusted R², RMSE, MAE for continuous targets; AUC, accuracy, precision/recall for classification) 6. Plain-language interpretation of coefficients 7. Residual analysis to catch problems 8. Sample predictions with confidence intervals Provide complete, well-commented Python code using scikit-learn or statsmodels.