Python Code: Quantifying Forecastability Through Predictive Information
Auto-Mutual Information Analysis
Python implementation for horizon-specific Auto-Mutual Information (AMI) forecastability analysis. Quantifies the predictive information content of time series data at each forecast horizon using AMI, estimated via the scikit-learn k-nearest neighbour mutual information estimator. AMI is computed on first-differenced values to remove level persistence and trend, ensuring that measured structure reflects genuinely exploitable dependence beyond the random walk baseline rather than spurious correlation induced by non-stationarity. Each series is independently classified by the strength of its short-horizon signal and how that signal persists across horizons. Series with Low predictive information are flagged as suitable for baseline models. Moderate predictive information warrants moderate modelling complexity. High predictive information, where a strong short-horizon signal sustains across multiple steps, indicates that complex models may be justified.
Outputs:
-
Per-series AMI profile charts showing the raw series alongside its AMI profile
-
Classification and triage recommendation for each series
-
Structured results CSV
Dependencies:
-
Python 3.9+
-
numpy
-
pandas
-
matplotlib
-
seaborn
-
scikit-learn