Does statsmodels compute R2 and other metrics on a validation-/test- set? Does statsmodels compute R2 and other metrics on a validation set?
I am using the OLS from the statsmodels.api
when printing summary, an r2 and r2_asjusted are presented.
I did not trust those 0.88 and computed an own adjusted R2 with scikit-learn r2_score and the adjusted r2 function from this answer resulting in 0.88 as well. So the question arose.
No.
There's another question over on Stack Overflow concerning wrapping statsmodels models to use the sklearn conventions, so that you can use sklearn cross-validation, hyperparameter searches, etc.