You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any contribution is more than welcome. If you want to collaborate, do not hesitate to contact me. Improvements can be made by adding some tutorials with cool data or any other cool idea that you may have.
Code Example
fromsavar.model_generatorimportSavarGeneratorfromcopyimportdeepcopyfromsavar.dim_methodsimportget_varimax_loadings_standardasvarimaximportmatplotlib.pyplotaspltsavar_generator=SavarGenerator(n_variables=10,
n_cross_links=5,
time_length=500)
# You need to generate the modelsavar_model=savar_generator.generate_savar()
# You need to generate the datasavar_model.generate_data()
# You can use the varimax functions that come with SAVAR# Or use the package varimax^+ [install it `pip install git+https://github.com/xtibau/varimax_plus.git#egg=varimax_plus`]modes=varimax(savar_model.data_field.transpose()) # Use variamx to try to recover the weightsforiinrange(5): # Only three are meaningfulplt.imshow(modes['weights'][:, i].reshape(30, 90))
plt.colorbar()
plt.show()
License
SAVAR is a Free Software project under the GNU General Public License v3, which means all its code is available for everyone to download, examine, use, modify, and distribute, subject to the usual restrictions attached to any GPL software. If you are not familiar with the GPL, see the license.txt file for more details on license terms and other legal issues.
Cite
Tibau, X., Reimers, C., Gerhardus, A., Denzler, J., Eyring, V., & Runge, J. (2022). A spatiotemporal stochastic climate model for benchmarking causal discovery methods for teleconnections. Environmental Data Science, 1, E12. doi:10.1017/eds.2022.11