hibou.stats.plot_diurnal_cycle#

hibou.stats.plot_diurnal_cycle(*args, **kwargs)#

This functions show on a graph a daily cycle averaged for each month. Basically, you will get one average daily cycle per month. You can change the number of cycle you want. For instance, if you want 1 cycle per month, the cycle will by the mean of all the day of the month. If you want 2 cycles, each cycle is calculated from half the days in the month and so on. The table below summarizes some classic numbers of cycles and the associated averaging period:

Number of cycles and averaging period#

Number of cycles

Averaging period [1]

1

30 days

2

15 days

4

7 days

15

2 days

30

1 days

Parameters#

measurementsnp.array

The array of the targets of reference.

estimatesnp.array

The array that corresponds to the predicted targets.

timestampsnp.array

The timestamps for the given targets

fluxes_namesIterable[str]

An list-like that contains the name of the fluxes.

nb_cycles: int, optionnal

By default: 1. The number of cycles per month.

nb_monthint, optionnal

By default: 12. The number of month into the given data.

points_per_dayint, optionnal

By default: 48. The temporal resolution of the targets. By default its set on 48 points per day which corresponds to one point every half hour.

missing_sample_allowanceint, optionnal, keyword-only

By default: 100. The maximum percentage of missing data allowed in the calculation of the mean. Must be between 0 and 100.

filenamestr, optionnal

By default: "diurnal_cycles_{nb_cycles}". The name of the figure. The extension is automatically managed, so you don’t need to worry about.

Returns#

tuple

It returns a tuple that contains:

  • the root mean squared error (RMSE);

  • the Pearson’s correlation coefficient (PCC) calculated from the daily means;

  • a tuple (measurements_mean, measurements_std) that correspond to the diurnal cycles

for the measurements and the standard deviation on these cycles;

  • a tuple (estimates_mean, estimates_std) that correspond to the diurnal cycles for the

estimates and the associated standard deviation.

Important

The RMSE is calculated with the daily average extracted from measurements and not directly from the measurements. It therefore underestimates the RMSE calculated from measurements and estimates, since the model is better on average.