interpretml / interpret

Fit interpretable models. Explain blackbox machine learning.
https://interpret.ml/docs
MIT License
6.23k stars 725 forks source link

What happens if `interactions` is set to an integer #193

Closed Sim19 closed 3 years ago

Sim19 commented 3 years ago

Hi all,

What happens exactly if we set the “interaction” parameter to an integer, i.e. 5 or 10? Does it provide 5/10 interaction pairs? How are these pairs determined?

Thank you for your support.

interpret-ml commented 3 years ago

Hi Simone,

Good question! Yes, setting the interactions parameter to an integer n means that the algorithm picks the estimated top n most significant pairwise interaction terms to include as part of the model training. Of course, if you have specific interaction terms you know to be important, you can always pass those in directly to the interactions parameter (i.e. interactions = [[2,3], [2,4]] would include interactions on features 2/3 and features 2/4 respectively).

If using automated interaction detection, the most significant pairs are estimated through an algorithm called FAST, which considers and ranks all O(N^2) possible interaction terms. This algorithm is run on each outer_bag of EBM, which gives us k rankings per pairwise interaction term, which we then aggregate and select the top n final best pairs from.

The FAST algorithm is described in full detail in this paper: "Accurate intelligible models with pairwise interactions" (Y. Lou, R. Caruana, J. Gehrke, and G. Hooker 2013)

Please let us know if you have any further questions! -InterpretML Team

Sim19 commented 3 years ago

Dear InterpretML-Team,

thank you for the quick and detailed response. That really helps. I also found back this issue on FAST, which helps with the greater details.

Thanks a lot!

Sim19 commented 3 years ago

Sorry, I wanted to keep it open in case others are having the same questions..

interpret-ml commented 3 years ago

Closing since there are no actionable items for us. If anyone has more questions please feel free to re-open this issue.

-InterpretML Team