-
-
Save sararob/95b56d58ebcbc6e5ac3aa8a2896f9905 to your computer and use it in GitHub Desktop.
Generating explanation metadata for tabular models
This file contains 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
# The following explanation metadata can be used for tabular models that accept a numpy array as input | |
# Write the `explanation_metadat` object below to a JSON file called explanation_metadata.json | |
explanation_metadata = { | |
"inputs": { | |
"data": { | |
"input_tensor_name": model.input.name, | |
"input_baselines": [train_data.median().values.tolist()], | |
"encoding": "bag_of_features", | |
"index_feature_mapping": train_data.columns.tolist() | |
} | |
}, | |
"outputs": { | |
"duration": { | |
"output_tensor_name": model.output.name | |
} | |
}, | |
"framework": "tensorflow" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment