binarize_percent¶
-
binarize_percent
(netin, level, sign='pos', axis='time')[source]¶ Binarizes a network proprtionally. When axis=’time’ (only one available at the moment) then the top values for each edge time series are considered.
Parameters: - netin (array or dict) – network (graphlet or contact representation),
- level (float) – Percent to keep (expressed as decimal, e.g. 0.1 = top 10%)
- 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, default='time') – Specify which dimension thresholding is applied against. Can be ‘time’ (takes top % for each edge time-series) or ‘graphlet’ (takes top % for each graphlet)
Returns: netout – Binarized network
Return type: array or dict (depending on input)