graphlet2contact¶
-
graphlet2contact
(tnet, params=None)[source]¶ Converts array representation to contact representation.
Contact representation are more efficient for memory storing. Also includes metadata which can made it easier for plotting. A contact representation contains all non-zero edges.
Parameters: - tnet (array_like) – Temporal network.
- params (dict, optional) –
Dictionary of parameters for contact representation.
- Fs : int, default=1
- sampling rate.
- timeunit : str, default=’’
- Sampling rate in for units (e.g. seconds, minutes, years).
- nettype : str, default=’auto’
- Define what type of network. Can be: ‘auto’: detects automatically; ‘wd’: weighted, directed; ‘bd’: binary, directed; ‘wu’: weighted, undirected; ‘bu’: binary, undirected.
- diagonal : int, default = 0.
- What should the diagonal be.
- timetype : str, default=’discrete’
- Time units can be The params file becomes the foundation of ‘C’. Any other information in params, will added to C.
- nodelabels : list
- Set nod labels.
- t0: int
- Time label at first index.
Returns: C – Contact representation of temporal network. Includes ‘contacts’, ‘values’ (if nettype[0]=’w’),’nettype’,’netshape’, ‘Fs’, ‘dimord’ and ‘timeunit’, ‘timetype’.
Return type: dict