Authors:
- Fernando Iglesias-Suarez - fernando.iglesias-suarez@dlr.de
- Breixo Soliño Fernández - breixo.solinofernandez@dlr.de
- Original CBRAIN-CAM code by Stephan Rasp - raspstephan@gmail.com - https://raspstephan.github.io
This repository provides the source code used on the paper Causally-informed deep learning to improve climate models and projections, by Iglesias-Suarez et al.
To install the dependencies, it is recomended to use Anaconda or Mamba. An environment file is provided in dependencies.yml
.
The results described in the paper where obtained by execute the following steps:
pipeline.ipynb
: Run PC1 within the PCMCI framework. This yields a set of causal drivers for each output at every grid column of SPCAM.aggregate_results.ipynb
: Collect, aggregate and evaluate causal links. Produces causal (correlation) matrix plots.- Find the appropriate threshold to filter spurious links, using SHERPA.
SHERPA_threshold_GridSearch.ipynb
: Best general threshold.notebooks_SHERPA_thrs_optimization_per_output/Create_optimized_numparents_dict_mse.ipynb
: Best threshold for each output.
- Creation and training of neural networks (NN).
NN_Creation.ipynb
: Can create both Causally-informed NN that use the best general threshold (from 2.1) and Non-causal NN that use all inputs.NN_Creation_optimized_threshold.ipynb
: Causally-informed NN that use the best threshold for each output (from 2.2).NN_Creation_random_links.ipynb
: NN using random links
- Evaluation
notebooks_evaluate_CausalNNs_r2/evaluate_nonlinearities_in_SPCAM.ipynb
: Comparation between the different types of NNnotebooks_online_evaluation
: Comparation with SPCAMcross_section_online_evaluation.ipynb
latitudinal_2Dfields_online_evaluation.ipynb
notebooks_xai/shap_xai.ipynb
: Use explainable AI to evaluate the importance of the inputs in each NN