teneto.utils

teneto.utils Package

Many helper functions for Teneto

Functions

graphlet2contact(tnet[, params]) Converts array representation to contact representation.
contact2graphlet(C) Converts contact representation to array representation.
binarize_percent(netin, level[, sign, axis]) Binarizes a network proprtionally.
binarize_rdp(netin, level[, sign, axis]) Binarizes a network based on RDP compression.
binarize_magnitude(netin, level[, sign]) Make binary network based on magnitude thresholding.
binarize(netin, threshold_type, threshold_level) Binarizes a network, returning the network.
set_diagonal(tnet[, val]) Generally diagonal is set to 0.
gen_nettype(tnet[, weightonly]) Attempts to identify what nettype input graphlet tnet is.
check_input(netin[, rasie_if_undirected, conmat]) This function checks that netin input is either graphlet (tnet) or contact (C).
get_distance_function(requested_metric) This function returns a specified distance function.
process_input(netin, allowedformats[, …]) Takes input network and checks what the input is.
clean_community_indexes(communityID) Takes input of community assignments.
multiple_contacts_get_values(C) Given an contact representation with repeated contacts, this function removes duplicates and creates a value
df_to_array(df, netshape, nettype[, start_at]) Returns a numpy array (snapshot representation) from thedataframe contact list
check_distance_funciton_input(…) Function checks distance_func_name, if it is specified as ‘default’.
get_dimord(measure[, calc, community]) Get the dimension order of a network measure.
get_network_when(tnet[, i, j, t, ij, logic, …]) Returns subset of dataframe that matches index
create_supraadjacency_matrix(tnet[, …]) Returns a supraadjacency matrix from a temporal network structure
df_drop_ij_duplicates(df)
tnet_to_nx(df[, t]) Creates undirected networkx object
is_jsonable(x) Check if a dict is jsonable.