From d9efdfcff184baaec054b52d21cdb0f655dba69b Mon Sep 17 00:00:00 2001 From: Thierry Moudiki Date: Wed, 7 Aug 2024 08:20:50 +0200 Subject: [PATCH] bump version --> 0.9.1 --- setup.py | 2 +- teller/explainer/explainer.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9c927f9..c5767ac 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from codecs import open from os import path -__version__ = '0.10.0' +__version__ = '0.9.1' with open("README.md", "r") as fh: diff --git a/teller/explainer/explainer.py b/teller/explainer/explainer.py index e08fcf2..1b22120 100644 --- a/teller/explainer/explainer.py +++ b/teller/explainer/explainer.py @@ -151,6 +151,7 @@ def predict_proba(x): return self.obj.predict_proba(x)[:, self.y_class] y_hat = predict_proba(X) + self.residuals_ = y - y_hat # heterogeneity of effects if method == "avg": @@ -247,6 +248,7 @@ def predict_proba(x): self.score_ = score_regression(self.obj, X, y, scoring=self.scoring) y_hat = self.obj.predict(X) + self.residuals_ = y - y_hat # heterogeneity of effects if method == "avg": @@ -378,8 +380,7 @@ def foo_gaussian(ix): ss_tot = np.sum((y - self.y_mean_) ** 2) ss_reg = np.sum((y_hat - self.y_mean_) ** 2) ss_res = np.sum((y - y_hat) ** 2) - - self.residuals_ = y - y_hat + self.r_squared_ = 1 - ss_res / ss_tot self.adj_r_squared_ = 1 - (1 - self.r_squared_) * (n - 1) / ( n - p - 1 @@ -530,6 +531,8 @@ def summary(self): ], ).transpose() ) + + return def plot(self, what): """Plot average effects, heterogeneity of effects, ...