PyLiang
A causality test in climate
Install / Use
/learn @Koni2020/PyLiangREADME
Disclaimer
This module is based on routines provided by Sanxiang Liang at http://www.ncoads.cn/.
What is the pyLiang?
The liang-kleeman information flow causality test is used to detect causality between two time series. In a dynamic system, when information flow is transmitted between two entities in a specific way and often implies causality. Specifically, if the information flow rate between two time series events is close to zero, there is no causal relationship, vice versa.
Dependencies
For the installation of pyLiang, the following packages are required:
Installation
pyLiang can be installed using pip
pip install pyLiang
Usage
A quick example of pyLiang usage is as follow.
import numpy as np
from pyLiang import causality_est
# Data generation
ts1 = np.random.rand(360,1)
ts2 = np.random.rand(360,1)
res = causality_est(ts1, ts2)
print(res)
References
- San Liang X. Unraveling the cause-effect relation between time series[J]. Physical Review E, 2014, 90(5): 052150. doi:10.1103/PhysRevE.90.052150
- San Liang X. Normalizing the causality between time series[J]. Physical Review E, 2015, 92(2): 022126. doi:10.1103/PhysRevE.92.022126
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
