Created
February 28, 2019 08:38
-
-
Save crawles/afefe30486328553a7a464e20fb9b9ce to your computer and use it in GitHub Desktop.
TensorFlow Boosted Trees
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## TL;DR: | |
# Train model. | |
est = tf.estimator.BoostedTreesClassifier(feature_columns, n_batches_per_layer) | |
est.train(train_input_fn) | |
# Per instance model interpretability: | |
pred_dict = est.experimental_predict_with_explanations(pred_input_fn) | |
# Global gain-based feature importances: | |
importances = est.experimental_feature_importances() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment