pyrregular.describe
Checks of how regular the time axis of a dataset is.
check_regularity(fn, df, ts_level) applies one of the checks below:
ts_level=False: each series is checked on the timestamps of its signals; one answer per series.ts_level=True: each series is reduced to its merged timeline (the union of the timestamps of its signals) and all series are checked together, as the signals of one group; one answer for the whole dataset.
Correspondence with the taxonomy in the paper’s appendix (a check returning False means the irregularity is present):
uneven sampling:
are_all_signals_sampled_at_constant_intervalsragged length:
are_all_signals_equal_lengthshift:
are_all_signals_not_strongly_offsetragged sampling:
do_all_signals_have_equal_sampling(the k-th intervals of two signals are compared, for the intervals both signals have)partial observation (NaN where a value was expected) is not checked here.
Each check receives T: a list (one item per series) of lists (one item per
signal) of sorted timestamp arrays. Timestamps are the original values, compared
exactly (datetimes as integer nanoseconds), so no rounding makes equal intervals
look different.
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|