pyGAM
pyGAM copied to clipboard
predict_proba not consistent with sklearn
LogisticGAM.predict_proba() not consistent with sklearn since it does not return a two-dimensional array. I got around this issue by defining a new derived class:
class myGAM(LogisticGAM):
def predict_proba(self, X):
proba = self.predict_mu(X)
pred_proba_sklearn_like = np.array([1 - proba, proba]).T
return pred_proba_sklearn_like
Perhaps that can be changed in future versions of pyGAM
BTW: Great package, thanks for the development!
+1, also encountered this; would be great to output [[proba_0, proba_1]...]
Open PR here #213