Using the init_score in EBM Classifier
Hi,
I'm trying to use the init_score parameter to offset a binary classification EBM by a couple of features using another EBM.
EBM_offset -> EBM_main
How should I use the predictions from the EBM_offset to create the init_score for the EBM_main? Currently we're using:
X_train["init_score"] = EBM_offset.predict_proba(X_train)[:,1]
However, we were wondering if this is the right approach? Alternatively we've considered using
preds = EBM_offset.predict_proba(X_train[offset_features])[:,1]
X_train["init_score"] = np.log(preds/(1-preds))
Which is the correct usage? - Or is there a better method to use?
The decision_function returns raw scores, so an easy way to do this is:
init_scores = EBM_offset.decision_function(X) probs = EBM_main.predict_proba(X, init_scores)
Or, if you prefer, you can merge the two models. This is more complicated, but there's a related example in: https://interpret.ml/docs/python/examples/custom-interactions.html