-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 #74
base: main
Are you sure you want to change the base?
Conversation
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
request change no 1:
in utils, there are some functions are missing, that's why CI was failed.
request change no 2:
also create a new file same as main.py, but this time, use tensorflow model imports instead of scikitlearn models we used earlier
in following snippets:
here scikit learn models has been used, same you have to use tensorflow models
here's the reference for tensorflow models: https://github.com/tensorflow/models/tree/master/official
example tf model (neural network models): You may tryout with smaller models. Note: have the previous scikitlearn support as it is, just in core.py add tensorflow models support, like when user use any tensorflow models in usage it'll be executable |
No description provided.