A Transfer Learning Approach

When we predict any time series data we typically use internal data and predict the future for example when we predict the temperature of a city we use historic temperature of the city and predict the future using a model. The model can incorporate various factors like seasonality, auto-regression (relationship with recent past) etc. But when it comes to predicting a novel phenomenon like active cases in a pandemic this will not work as we do not have enough past data as we are seeing only one cycle. Nevertheless as various countries are in different stages of the pandemic, this gives us an opportunity to learn from data of other countries to project for countries that are behind in the curve. We use this approach to predict the number of cases in the near future for the US, UK and India. To build the model we use an ARIMA model (Auto-regressive, Integrated and Moving Average). 

In statistics and econometrics, and in particular in Time series analysis, an Autoregressive Integrated Moving Average (ARIMA) model is a generalization of an Autoregressive Moving Average (ARMA) model. Both of these models are fitted to time series data either to better understand the data or to predict future points in the series (forecasting). ARIMA models are applied in some cases where data show evidence of non-stationarity, where an initial differencing step (corresponding to the “integrated” part of the model) can be applied one or more times to eliminate the non-stationary.

Another overlay on the model we do is to transform the existing data using various transformations. We have taken Italy and Spain as the base of transfer learning. Using these we identify the right transformation and one of the parameters of the ARIMA model namely the Degree of differencing (d).  Other parameters i.e. Auto-regression period (p) and Moving average period (q) are obtained for individual countries based on their best fit data. For transformations we used four different transformations: log, log2 (double log), square root and cube root. For differencing we tried d=1, 2 and 3.  We found that log transformation with double differencing (d=2) makes the data stationary in Italy and Spain. We use these parameters and optimize for p and q to forecast for all the countries. 


We predict active cases using this approach.

Active Cases = Total cases – Deaths – Recoveries

The p and q value for Italy are 2 and 2 and for Spain they are 2 and 2. Following are the forecasts for Italy and Spain using the data :

Italy

Spain

This process of learning part of the parameters from one data set and applying it to another data set is known as transfer learning. This is very important when we do not have large/varied data sets to make a model using internal data. The model parameters are summarized below:

 

India USA UK
P 3 3 3
q 3 2 3

 

Transfer learning has given a good framework for learning data from one country and using it in another country for forecasting novel phenomena. We use this approach not only for such time series forecasts but also for other forms of machine learning like natural language processing etc.

 

The forecasts based on these parameters for the next 14 days are given below :

India

USA

United Kingdom

Date India: 

Active cases Prediction

US:

  Active cases Prediction

UK:

 Active cases Prediction

15-May 50,548 1,036,562 207,200
16-May 52,598 1,034,322 209,757
17-May 56,518 1,033,280 211,760
18-May 60,074 1,028,696 219,496
19-May 62,190 1,024,358 226,029
20-May 64,494 1,017,567 227,391
21-May 68,297 1,010,136 231,829
22-May 72,591 1,000,978 240,322
23-May 75,993 990,798 244,472
24-May 79,058 979,250 246,236
25-May 83,097 966,597 253,105
26-May 87,981 952,769 260,617
27-May 92,581 937,884 262,936
28-May 96,746 921,965 266,492

 

Follow

Leave a Reply

Your email address will not be published. Required fields are marked *