Skip to content

Multidimensional time-series data prediction with a recurrent neural network (RNN) trained by RTRL; 2nd repo in a series of 3 repos associated with the research article "Prediction of the motion of chest internal points using an RNN trained with RTRL for latency compensation in lung cancer radiotherapy" (Pohl et al, Comput Med Imaging Graph, 2021)

License

Notifications You must be signed in to change notification settings

pohl-michel/Time-series-prediction-with-an-RNN-trained-with-RTRL

Repository files navigation

Update (10th October 2024): An extension of this repository is available here: https://github.com/pohl-michel/2D-MR-image-prediction. That new repository focuses on video forecasting but the "Time_series_forecasting" folder has several new functionalities, including a script to perform hyper-parameter optimization, the addition of other online algorithms for RNNs (unbiased online recurrent optimization, decoupled neural interfaces, sparse 1-step approximation, and a simpler implementation of real-time recurrent learning) and other evaluation metrics for general time series (not necessarily representing the motion of 3D objects).


This repository is the second of a series of three repositories containing code that we used in the research corresponding to the following article:

Michel Pohl, Mitsuru Uesaka, Kazuyuki Demachi, Ritu Bhusal Chhatkuli, "Prediction of the motion of chest internal points using a recurrent neural network trained with real-time recurrent learning for latency compensation in lung cancer radiotherapy", Computerized Medical Imaging and Graphics, Volume 91, 2021, 101941, ISSN 0895-6111

You can access it with the following links:

The code in this repository predicts multidimensional time-series data using a recurrent neural network (RNN) trained by real-time recurrent learning (RTRL) with gradient clipping. The two other repositories corresponding to the article mentioned above are the following:

Please kindly consider citing our published article if you use this code in your research. Also, please do not hesitate to look at the other two repositories mentioned above.

Please also have a look at the following repository, which extends the current repository by including training of RNNs with Unbiased Online Recurrent Optimization (UORO) and hyper-parameter optimization, as well as the associated research and blog articles:

The figure below gives an example of prediction 400ms in advance with RTRL (the sampling rate is 2.5Hz). alt text

Our implementation is based on the chapter 15 ("Dynamically Driven Recurrent Networks") of the following book : Haykin, Simon S. "Neural networks and learning machines/Simon Haykin." (2009).

The main script to execute is "prediction_main.m". The data to be predicted is in the directory named "1. Input time series sequences", and represents the 3D motion of 3 implanted metal markers in the chest during lung cancer radiotherapy. The markers move because of the respiratory motion and their position is sampled at approximately 2.5Hz.

The parameters concerning prediction and display should be set manually in the files "pred_par.xlsx" and "disp_par.xlsx", and the "load_pred_par.m" function. For instance, one can choose to use training with gradient clipping or not by setting manually the field update_meth of the pred_par structure (line 28). The behavior of the program is controlled by the structure beh_par defined in "load_behavior_parameters.m". In particular, one can choose to perform computations on the GPU by setting beh_par.GPU_COMPUTING = true. The fields of that structure can be set manually.

The figures showing prediction on the test data and the loss function are saved in the following folders: "1. Prediction results (figures)" and "2. Prediction results (images)". The RNN results are saved in the folder "3. RNN variables (temp)". The parameters used and the numerical RNN evaluation results are also recorded in a txt file located in the folder "4. Log txt files".

Note : prediction is made without any specific assumption on the nature of the temporal data, but the evaluation of the RNN uses the assumption that the data represents the 3D position of several objects.

About

Multidimensional time-series data prediction with a recurrent neural network (RNN) trained by RTRL; 2nd repo in a series of 3 repos associated with the research article "Prediction of the motion of chest internal points using an RNN trained with RTRL for latency compensation in lung cancer radiotherapy" (Pohl et al, Comput Med Imaging Graph, 2021)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages