A computer-implemented method of generating data indicating tension of oxygen and/or carbon dioxide in blood of a preterm baby based upon data indicating brain activity of said preterm baby, the method comprising receiving said data indicating brain electrical activity of said preterm baby processing said data indicating brain electrical activity of said preterm baby to generate activity data indicating length of at least one period of relatively low brain activity processing said data indicating brain electrical activity of said preterm baby to generate power data indicating power of a frequency band of said data indicating brain activity of said preterm baby and combining said activity data and said power data to generate said data predicting the tension of oxygen and/or carbon dioxide in the blood of said preterm baby.