Implement RegressionModel.pseudo_rsquared_adj

This commit is contained in:
RunasSudo 2023-04-21 18:11:04 +10:00
parent 53a0e98227
commit 8899d1c968
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 6 additions and 0 deletions

View File

@ -541,6 +541,12 @@ class RegressionModel:
return 1 - self.ll_model/self.ll_null
@property
def pseudo_rsquared_adj(self):
"""McFadden's pseudo *R*:sup:`2` statistic, adjusted for number of parameters"""
return 1 - (self.ll_model - self.dof_model) / self.ll_null
def shap(self, **kwargs):
"""
Compute SHAP values for the model