locan.data.cluster.utils.serial_clustering#

locan.data.cluster.utils.serial_clustering(locdata, algorithm, parameter_lists, **kwargs)[source]#

Run and analyse a series of clustering processes to identify optimal parameters.

Parameters:
  • locdata (LocData) – Localization data.

  • algorithm (Callable[..., Any]) – The locan clustering algorithm to use on locdata.

  • parameter_lists (dict[str, Any]) – A dictionary with all parameter lists that are to be iterated. The keys should be identical to parameter names of the used algorithm.

  • kwargs (Any) – Optional keyword arguments that are passed to the algorithm.

Returns:

The first element is a LocData object with a selection of all localizations that are defined as noise. If noise is false this element will be None. The second element is a new LocData instance assembling all generated selections (i.e. localization cluster).

Return type:

tuple[LocData, …]