filter
Functions:
-
threshold_connected–filter edge-weights until the graph is (barely) connected.
-
threshold_value–Filter edge-weights below a given value.
threshold_connected
filter edge-weights until the graph is (barely) connected.
Uses binary search to efficiently find maximum threshold, and cardinality of a breadth-first search to check for connectivity (must be at least same edges as a spanning tree)
Parameters:
-
(KSimsMat) –square matrix (e.g. kernel) to be thresholded
-
(binbool, default:True) –whether to binarize the output, or cut-off only.
Source code in affinis/filter.py
threshold_value
Filter edge-weights below a given value.
Parameters:
-
(KSimsMat) –square matrix (e.g. kernel) to be thresholded
-
(tfloat) –cutoff-value
-
(binbool, default:True) –whether to binarize the output, or cut-off only.