Sensitivity Analysis
This was already implemented in the the DAAAD toolbox.
You can find the sensitivity analysis (SA) implementation in the branch "SensitivityAnalysis" in the DAAAD repository. In this branch, you can find the functions implemented in the file daaad\src\models\cae.py.
I also created a notebook ("gridshell_testSensitivities_red.") where the functionalities are shown and can be tested.
Rafael's Original SA functions: sensitivity_analysis(),__sensitivity_gradients_x(), __sensitivity_gradients_y()
My revised implementation SA functions: (distinguishing between continuous and categorical) sensitivity_analysis_wip(), __sensitivity_cat_y(), plot_sensitivities(), sample_in_X_eps_neighborhood() (and also uses these functions: __sensitivity_gradients_x(), __sensitivity_gradients_y())
At the moment, the implementation only works for dy/dx and only if dy is continuous. dx on the other hand can be continuous or categorical. If dx is continuous: the gradients are calculated. If dx is categorical: we calculate the change in y for a switch from one category to another.
I am happy to explain it in more detail when you get started on implementing this.
Screenshot of results with old implementation: