Skip to content
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
wants to merge 17 commits into from

Conversation

Sakeebhasan123456
Copy link

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.

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
@ombhojane
Copy link
Owner

There are some merge conflicts arised, please do git pull and modify the codes

@ombhojane
Copy link
Owner

Hey @Sakeebhasan123456 any update?

@Sakeebhasan123456
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants