Abstract
This article proposes a Bayesian nonparametric method for forecasting, imputation, and clustering in sparsely observed, multivariate time series data. The method is appropriate for jointly modeling hundreds of time series with widely varying, non-stationary dynamics. Given a collection of $N$ time series, the Bayesian model first partitions them into independent clusters using a Chinese restaurant process prior. Within a cluster, all time series are modeled jointly using a novel "temporally-reweighted" extension of the Chinese restaurant process mixture. Markov chain Monte Carlo techniques are used to obtain samples from the posterior distribution, which are then used to form predictive inferences. We apply the technique to challenging forecasting and imputation tasks using seasonal flu data from the US Center for Disease Control and Prevention, demonstrating superior forecasting accuracy and competitive imputation accuracy as compared to multiple widely used baselines. We further show that the model discovers interpretable clusters in datasets with hundreds of time series, using macroeconomic data from the Gapminder Foundation.
Introduction
Real-world multivariate time series—such as regional disease rates or national economic indicators—present significant modeling challenges. These datasets are often high-dimensional, non-stationary, and sparse. Traditional models like Vector Autoregression (VAR) often suffer from numerical instability in high dimensions, while parametric models like ARIMA or Facebook Prophet frequently require manual specification of trends and seasonality. This paper introduces the Temporally-Reweighted Chinese Restaurant Process (TRCRP) mixture, a domain-general Bayesian nonparametric method designed to learn complex patterns empirically from data without extensive custom modeling.
Methodology: The TRCRP Mixture
The core innovation of this work is a hierarchical clustering approach that operates at two levels: clustering the series themselves and clustering the time points within those series.
Hierarchical Clustering Structure
The model first partitions $N$ time series into independent groups using a Chinese Restaurant Process (CRP) prior. Series within the same group are assumed to share a common "temporal segmentation," meaning they transition between latent regimes simultaneously. Within each group, the model identifies hidden regimes using the novel Temporally-Reweighted extension of the CRP. Unlike standard CRP mixtures that assume independence between data points, the TRCRP reweights the probability of a time point $t$ belonging to a regime based on its recent history.
Empirical Regime Discovery
Specifically, a "cohesion function" compares the current lagged window of size $p$ to historical windows. If the current dynamics match a previously observed regime, the model is more likely to assign the current data to that regime. By using Student-T distributions within the cohesion function, the model effectively asks when in the past the dynamics looked similar to the present. This empirical approach allows the model to capture non-linearities and non-stationarity without explicit structural formulas. Furthermore, the model employs a "Naive Bayes" assumption within regimes—treating different series as independent given the regime—which provides the necessary regularization to handle hundreds of variables.
Experimental Evaluation
The TRCRP was evaluated on diverse datasets, including US CDC flu data and Gapminder macroeconomic indicators.
Forecasting and Imputation
On the US CDC flu dataset, which includes weekly influenza-like-illness (ILI) rates, Twitter mentions, and temperature data, the multivariate TRCRP demonstrated superior performance. It consistently achieved the lowest mean absolute error across forecast horizons ranging from 1 to 10 weeks, outperforming baselines such as Facebook Prophet, Seasonal ARIMA, and HDP-HSMM. Notably, the performance gap widened at longer horizons, indicating the model's strength in capturing long-term seasonal dynamics.
Structure Discovery
The model's ability to discover interpretable clusters was highlighted using Gapminder GDP data. Without prior knowledge of the number of clusters, the TRCRP automatically identified nine distinct groups corresponding to geopolitical realities, such as Western democracies and fast-growing Asian economies. For filling in missing data, TRCRP performed on par with state-of-the-art imputation tools like Amelia II, but proved better at capturing non-linear "peaks" that simpler linear interpolators missed.
Discussion and Conclusion
The TRCRP mixture offers a robust, flexible framework for multivariate time series analysis. By combining hierarchical clustering with temporal reweighting, it effectively handles non-stationarity and high dimensionality. While the choice of the lag window $p$ and the computational cost of MCMC inference are considerations for practitioners, the model's ability to provide accurate forecasts and discover meaningful latent structures makes it a powerful tool for complex data environments.
Summary updated