-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Tensorflow model support #37
Closed
Closed
Conversation
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
i did changess in feature importance and genrate visuaalization ,also add tensorflow
download scikeras library for using Keras Classifier and keras Regressor
SHAP Calculation for TensorFlow Models: Modified calculate_shap_values to use shap.DeepExplainer for TensorFlow models. Handling SHAP Output: Ensured that the output from shap.DeepExplainer is correctly wrapped in a shap.Explanation object for consistency.
Handling Predictions from TensorFlow Models: TensorFlow models return predictions differently. For regression, they output continuous values. For classification, they might output probabilities or logits. We adjust y_pred accordingly, converting probabilities to class labels when necessary. Model Type Parameter: Added model_type parameter to indicate whether the model is a TensorFlow or scikit-learn model. Default is 'sklearn' for backward compatibility. Classification Handling: For binary classification, we threshold probabilities at 0.5. For multi-class classification, we use np.argmax to get class labels.
please install scikeras libarary
There are some merge conflicts arised, please do git pull and modify the codes |
Hey @Sakeebhasan123456 any update? |
hii @ombhojane thank you very much for your patience, please check I think now all problems are resolved |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The modifications made to core.py, model_interpretability.py, and utils.py successfully extend support for TensorFlow models within the codebase. By carefully adjusting the handling of model fitting, evaluation, interpretability, and utility functions, we ensure that both scikit-learn and TensorFlow models can be integrated seamlessly.