New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computational complexity of EBM #495
Comments
Hi @JWKKWJ123 -- I think what you're asking for is the total number of bins within the "term_scores_" attribute of the EBM model? I'm not clear on what a trainable vs non-trainable parameter would be in the context of EBMs. We don't currently expose the ability to freeze parts of an EBM in the way you might with a neural net, although we do offer the init_score parameter for these scenarios. |
Hi Paul, |
As Paul mentioned, it's not ideal to think of each bin as an independent parameter, but it's probably the closest approximation we have to a "trainable parameter" in EBMs. Your formula for this is approximately right for binary classification and regression. You'll need to multiply by the number of classes in the case of multiclass regression with >= 3 classes. That said, the exact number of parameters varies beyond that formula because 1) the number of bins may be smaller than max_bins if there aren't sufficiently many unique values in the data (e.g. a boolean feature will always have only 2 bins, not 256) and 2) categorical features are handled separately, and can have either more or less than the max_bins number of values. In practice, for any specific dataset, the way to calculate this exactly is to just sum up the lengths of the values in |
I agree with everything Harsha said, but wanted to add one detail to this sentence. When you get the length of the arrays in "term_scores_", you'll want to ravel them before taking the length if you have pairs or multiclass. |
Hi all, |
Hi all,
I'm interested in comparing the computational complexity of EBM and other machine learning models. I think calculating the number of trainable and non-trainable parameters of a model is one approach. I want to know whether EBM can output the total parameters of the output model (including trainable parameters and non-trainable parameters) based on the input features and the hyperparameters of the model?
The text was updated successfully, but these errors were encountered: