interpret icon indicating copy to clipboard operation
interpret copied to clipboard

Exporting EBM as PMML

Open lukedex opened this issue 9 months ago • 1 comments

Hi all,

Has anyone had success or know of a way to export an EBM as PMML?

I can see external support to output as ONNX or SQL format but I'm struggling to find a way to export as PMML. I've looked at some of the sklearn exporting options as I thought this way be a way forward but have failed on those.

Thanks

lukedex avatar May 02 '24 13:05 lukedex

Hi @lukedex -- I'm not aware of a PMML exporter for EBMs and a search on github for "explainable boosting" PMML yields no results, so if there is one it's very well hidden.

Given the development needs in other areas I probably won't work on this myself in the near term, but I'll leave it in our backlog, and would welcome a PR if anyone would like to contribute such an exporter.

paulbkoch avatar May 02 '24 14:05 paulbkoch

SkLearn2PMML versions 0.108.0 and newer support all InterpretML glassbox estimators, including the ExplainableBoostingClassifier and ExplainableBoostingRegressor estimator classes.

Here's a demo:

from interpret.glassbox import ExplainableBoostingClassifier
from sklearn2pmml import sklearn2pmml

classifier = ExplainableBoostingClassifier(random_state = 13)
classifier.fit(X, y)

sklearn2pmml(classifier, "EBM.pmml")

So, I believe this issue can be closed as "fixed" now.

vruusmann avatar May 24 '24 08:05 vruusmann

Thank you @vruusmann, that’s great news!

Closing the issue.

paulbkoch avatar May 24 '24 10:05 paulbkoch