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#
- measurements
np.array The array of the targets of reference.
- estimates
np.array The array that corresponds to the predicted targets.
- timestamps
np.array The timestamps for the given targets
- fluxes_names
Iterable[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_month
int, optionnal By default:
12. The number of month into the given data.- points_per_day
int, 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_allowance
int, 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.- filename
str, 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#
tupleIt 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
measurementsand not directly from themeasurements. It therefore underestimates the RMSE calculated frommeasurementsandestimates, since the model is better on average.- measurements