conpy.stats.cluster_threshold#
- conpy.stats.cluster_threshold(con, src, min_size=20, max_spread=0.013, method='single', verbose=None)[source]#
Threshold connectivity using clustering.
First, connections are grouped into “bundles”. A bundle is a group of connections which start and end points are close together. Then, only bundles with a sufficient amount of connections are retained.
- Parameters:
- coninstance of Connectivity
Connectivity to threshold.
- srcinstance of SourceSpace
The source space for which the connectivity is defined.
- min_sizeint
Minimum amount of connections that a bundle must contain in order to be accepted.
- max_spreadfloat
Maximum amount the position (in metres) of the start and end points of the connections may vary in order for them to be considered part of the same “bundle”. Defaults to 0.013.
- methodstr
Linkage method for fclusterdata. Defaults to ‘single’. See documentation for
scipy.cluster.hierarchy.fclusterdata
for for more information.- verbosebool | str | int | None
If not
None
, override default verbose level (seemne.verbose()
and Logging documentation for more).
- Returns:
- thresholded_connectivityinstance of Connectivity
Instance of connectivity with the thresholded data.