Comments (3)
Thanks @Howard-ll , we are happy to hear the tools are useful!
There are various definitions of "feature importance" -- they are all metrics about the model/dataset, but there is not an absolute "truth" or best one.
Now we should have a clear documentation page with the list of all feature importances we support -- with pointers to the papers that define some of them -> making this as an "enhancement" for us to work on.
from decision-forests.
I ran the feature significant and compared the results to Sklearn output. not only the results are different, but also the results that I'm getting using this implementation doesn't make any sense(using the info that I have about my data).
for example a feature that is constant is one of the most significant features(it got the heights value).
maybe I don't know how to read the output properly?
("data:0.33" (1; #27), 235)
this means that feature number 27 got score of 235?
Tsachi
from decision-forests.
The list of features importances and their definition is given here in the Yggdrasil user manual.
model.make_inspector().variable_importances()
returns a list of tuple ([py_tree.dataspec.SimpleColumnSpec](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/inspector/SimpleColumnSpec), float)
(see doc).
"data:0.33" (1; #27)
is the representation of a SimpleColumnSpec object with the format `"{feature name}" (type idx, #column_idx)" (see here). The last displayed value is the variable importance value (235 in this case).
Note that different variable importances have different semantics. Unless specified, the greater the value, the most important the feature. NUM_AS_ROOT
is an exemple of exception (see its definition).
Could you let me know which option I should use to get similar importance list as sklearn?
Sklean's "mean decrease in impurity" is likely close to the SUM_SCORE
variable importance in.
Similarly, Sklean's "based on feature permutation" is likely close to the MEAN_DECREASE_IN_ACCURACY
.
Where can I get the detailed descriptions on those options? (How to use, what they mean)
The Variable importance section of the user documentation and the model specific documentation (for example, Random Forest).
The variable_importances()
method is used in both the beginner and advanced colabs. However, we have not yet published any example of use of feature importance (e.g. for feature selection).
from decision-forests.
Related Issues (20)
- How to use tfdf.builder.CARTBuilder to build/train a decision tree by hand HOT 19
- Models trained with fit_on_dataset_path behave unexpectedly HOT 2
- Models trained on pure 1's predict 0 HOT 3
- max_vocab_count won't work for CATEGORICAL integerized in tfdf.keras.GradientBoostedTreesModel HOT 5
- Save and load model with tunning in automatic_tuning_colab.ipynb HOT 4
- Symbol not found, but versions are compatible according to the website HOT 4
- Loading a model returns either an untrained model or broken model HOT 1
- Using call_get_leaves inside @tf.function call in ensemble model inherits from tensorflow.keras.Model HOT 10
- no wheels for apple silicon (macos-arm64) HOT 2
- ANE support through coremltools HOT 4
- Can't use both `sample_weight` and `class_weight` at the same time HOT 1
- Is there a method like ydf.load_model() to load model get a instance of tfdf.keras.RandomForestModel? HOT 2
- decision forests tutorial tf_df_in_tf_js code wasn't working for me
- gpu support for layer use HOT 1
- DistributedGradientBoostedTreesModel does not support Ranking task HOT 1
- TF-DF Compatibility with Keras 3? HOT 6
- make_inspector() throws object of type 'NoneType' has no len() when I retrieve TF DF RF model layer in the hybrid model HOT 3
- tfdf 1.9.0 only compatible with tf 2.16.1 which ships Keras 3 HOT 8
- tensorflow-decision-forests 1.5.0 requires tensorflow~=2.13.0, but you have tensorflow 2.16.1 which is incompatible.
- Decision forest documentation link is broken in the Main page HOT 2
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 decision-forests.