CBN Journal of Applied Statistics (JAS)
Comparative Forecast of Inflation in Nigeria Using KNN and LSTM Integrated with Hidden Markov Models
Keywords
Inflation forecasting, K-Nearest Neighbours, Long Short-Term Memory, Hidden Markov Model, Regime switching, Nigeria
Abstract
This study compares the forecasting performance of the K-Nearest Neighbours (KNN) model and Long Short-Term Memory integrated with a Hidden Markov Model(LSTM HMM), for predicting inflation in Nigeria. Annual data on inflation rate, gross domestic product (GDP) and GDP per capita covering 1960–2022 were used. In flation was classified into low, moderate and high regimes, with the transition be haviour captured using the Hidden Markov component. The estimated steady-state probabilities were 32%, 59% and 9% for low, moderate and high inflation regimes, respectively, indicating that Nigeria’s inflation process was more likely to remain in a moderate inflation state in the long run. The model comparison showed that the KNN model outperformed the regime-switching LSTM model, with lower MAPE, RMSE, SEM, and MSE. The findings suggest that the simpler non-parametric KNN model provided more accurate forecasts, while the LSTM-HMM framework better explained regime-dependent inflation behaviour. The study also shows that GDP per capita contributes meaningfully to inflation prediction, implying that policies aimed at improving real per-person output and stabilising macroeconomic conditions may support more effective inflation management in Nigeria.
Issue
2
Volume
16
First Page
79
Last Page
107
Recommended Citation
Nkemnole, Bridget
(2025)
"Comparative Forecast of Inflation in Nigeria Using KNN and LSTM Integrated with Hidden Markov Models,"
CBN Journal of Applied Statistics (JAS): Vol. 16:
No.
2, Article 3.
DOI: https://doi.org/10.33429/Cjas.16225.3/6
Available at:
https://dc.cbn.gov.ng/jas/vol16/iss2/3