  Purpose. Radiation therapy is a local treatment aimed at cells in and around
a tumor. The goal of this study is to develop an algorithmic solution for
predicting the position of a target in 3D in real time, aiming for the short
fixed calibration time for each patient at the beginning of the procedure.
Accurate predictions of lung tumor motion are expected to improve the precision
of radiation treatment by controlling the position of a couch or a beam in
order to compensate for respiratory motion during radiation treatment.
  Methods. For developing the algorithmic solution, data mining techniques are
used. A model form from the family of exponential smoothing is assumed, and the
model parameters are fitted by minimizing the absolute disposition error, and
the fluctuations of the prediction signal (jitter). The predictive performance
is evaluated retrospectively on clinical datasets capturing different behavior
(being quiet, talking, laughing), and validated in real-time on a prototype
system with respiratory motion imitation.
  Results. An algorithmic solution for respiratory motion prediction (called
ExSmi) is designed. ExSmi achieves good accuracy of prediction (error $4-9$
mm/s) with acceptable jitter values (5-7 mm/s), as tested on out-of-sample
data. The datasets, the code for algorithms and the experiments are openly
available for research purposes on a dedicated website.
  Conclusions. The developed algorithmic solution performs well to be
prototyped and deployed in applications of radiotherapy.
