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.

    Fsint, default=1

    sampling rate.

    timeunitstr, default=’’

    Sampling rate in for units (e.g. seconds, minutes, years).

    nettypestr, default=’auto’

    Define what type of network. Can be: ‘auto’: detects automatically; ‘wd’: weighted, directed; ‘bd’: binary, directed; ‘wu’: weighted, undirected; ‘bu’: binary, undirected.

    diagonalint, default = 0.

    What should the diagonal be.

    timetypestr, default=’discrete’

    Time units can be The params file becomes the foundation of ‘C’. Any other information in params, will added to C.

    nodelabelslist

    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