phasik.classes.TemporalNetwork.TemporalNetwork.from_edge_list_dataframe

classmethod TemporalNetwork.from_edge_list_dataframe(edges, normalise=None, threshold=0, binary=False, temporal_edges=None)[source]

Create a TemporalNetwork from a DataFrame of edges over time

Parameters
  • edges (pandas.DataFrame) – With columns representing source node, target node, time and (optionally) weight

  • normalise ({'local', 'global', None}, optional) – Value determining what (if any) normalisation is applied (default None). If ‘normalise’ is ‘global’, all weights will be divided through by the max weight across all edges. If ‘normalise’ is ‘local’, all weights corresponding to an edge (i,j) at some time will be divided through by the max weight of the edge (i,j) across all times. To skip normalisation, set to None.

  • threshold (float, optional) – Any edges with weight < ‘threshold’ (after normalising) will not be included in the temporal network (default 0.0)

  • binary (bool, optional) – If True, all positive weights (after thresholding) will be set to 1. If False, does nothing. (Default False)

  • temporal_edges (list of str or int, optional) – List of edges for which we have temporal information (default None)

Returns

Return type

phasik.TemporalNetwork.TemporalNetwork