Comments (5)
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.
from interpret.
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 term_scores_
as Paul mentioned. But your formula is a reasonable approximation!
from interpret.
In practice, for any specific dataset, the way to calculate this exactly is to just sum up the lengths of the values in
term_scores_
as Paul mentioned.
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.
from interpret.
Hi all,
Thank you very much! The approximation of total parameters is enough for me for now! So I may choose to calculate the parameter based on the number of features and bins.
from interpret.
term_scores
Hi Paul,
Thanks for the reply, I understood that all parameters are ‘trainable’ in EBM. Because I'm not particularly familiar with GBDT, I am still confused with the calculating of total parameters.
If I have a dataset of 10 features, and the EBM classifier have the default setting:
class interpret.glassbox.ExplainableBoostingClassifier(feature_names=None, feature_types=None, max_bins=256, max_interaction_bins=32, interactions=10, exclude=[], validation_size=0.15, outer_bags=8, inner_bags=0, learning_rate=0.01, greediness=0.0, smoothing_rounds=0, max_rounds=5000, early_stopping_rounds=50, early_stopping_tolerance=0.0001, min_samples_leaf=2, max_leaves=3, objective='log_loss', n_jobs=- 2, random_state=42)
Then how to calculate the total parameters?
e.g.(I think it is not correct):
N(parameters) ≈ N(features)* max_bins + N(pairwisefeatures)* max_interaction_bins
from interpret.
Related Issues (20)
- How to get word importance HOT 1
- Development installation: Requirements? HOT 2
- Query: performance prospects on massive data sets (curse of dimensionality?) HOT 3
- How to speed up EBM model? Unbelievable slow. HOT 9
- Question: Parallel boosting? HOT 4
- Integrate EBM into the pytorch framework HOT 7
- Visualising Decision Tree explainer gives a Cytoscape object which is not savable to my local machine HOT 2
- [DP-EBM] Question regarding range R and sensitivity
- Support for more parameters in the Differentially Private models HOT 1
- NAM Model HOT 1
- Some hyperparameter questions HOT 3
- Lookup Table for single feature and feature interaction terms HOT 4
- Operations when merging EBM HOT 6
- EBM Classifier Global Feature Importance x Random Forest Classifier with Morris Sensitivity Analysis HOT 1
- possibility of adding `sample_weight` to `interpret.glassbox.ClassificationTree` HOT 6
- 2d PDP Z-axis colours appear too similar HOT 1
- Exporting EBM as PMML HOT 3
- Feature Request: Passing Validation Set or Index HOT 2
- Explore the data with continuous output and category input HOT 4
- Using the init_score in EBM Classifier HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interpret.