tnetwork.DynGraphSN.aggregate_sliding_window¶
-
DynGraphSN.
aggregate_sliding_window
(bin_size=None, shift=None, t_start=None, t_end=None, weighted=True)[source]¶ Return a new dynamic graph without modifying the original one, aggregated using sliding windows of the desired size. If Shift is not provided or equal to bin_size, windows are non overlapping. If no parameter is provided, creates a single graph aggregating the whole period. Yielded graphs are weighted (weight: number of apparition of edges during the period)
Parameters: - bin_size – desired size of bins, in the internal time unit (not necessarily equals to the number of snapshot_affiliations)
- shift – time distance (shift) between the start of two successive bins, in the internal time unit (not necessarily number of sn)
- t_start – time step to start the binning (default: first)
- t_end – time step (not included) to stop the binning (default: last)
Returns: a DynGraph_SN object