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

Shap fix #762

Merged
merged 12 commits into from
Jun 24, 2024
Prev Previous commit
Next Next commit
fixing everything
  • Loading branch information
isaacmg committed Jun 20, 2024
commit a10ca4e9815bdd7d09630949036a022c0276c8ca
2 changes: 1 addition & 1 deletion flood_forecast/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get_model_r2_score(
):
"""

model_evaluate_function should call any necessary preprocessing
model_evaluate_function should call any necessary preprocessing.
"""
test_river_data, baseline_mse = stream_baseline(river_flow_df, forecast_column)

Expand Down
2 changes: 1 addition & 1 deletion flood_forecast/explain_model_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def deep_explain_model_summary_plot(
hist.cpu().numpy(), names=["batches", "observations", "features"]
)

shap_values = deep_explainer.shap_values(history)
shap_values = deep_explainer.shap_values(history, check_additivity=False)
shap_values = fix_shap_values(shap_values, history)
shap_values = np.stack(shap_values)
if len(shap_values.shape) != 4:
Expand Down