binarize¶
- binarize(netin, threshold_type, threshold_level, outputformat='auto', sign='pos', axis='time')[source]¶
Binarizes a network, returning the network. General wrapper function for different binarization functions.
- Parameters:
netin (array or dict) – Network (graphlet or contact representation),
threshold_type (str) – What type of thresholds to make binarization. Options: ‘rdp’, ‘percent’, ‘magnitude’.
threshold_level (str) – Paramter dependent on threshold type. If ‘rdp’, it is the delta (i.e. error allowed in compression). If ‘percent’, it is the percentage to keep (e.g. 0.1, means keep 10% of signal). If ‘magnitude’, it is the amplitude of signal to keep.
outputformat (str) – specify what format you want the output in: G, C, TN, or DF. If ‘auto’, input form is returned.
sign (str, default='pos') – States the sign of the thresholding. Can be ‘pos’, ‘neg’ or ‘both’. If “neg”, only negative values are thresholded and vice versa.
axis (str) – Threshold over specfied axis. Valid for percent and rdp. Can be time or graphlet.
- Returns:
netout – Binarized network
- Return type:
array or dict (depending on input)