pygpcca.GPCCA.optimize

GPCCA.optimize(m)[source]

Full G-PCCA spectral clustering method with optimized memberships [Reuter18], [Reuter19].

It also has the option to optimize the number of clusters (macrostates) m as well.

If a single integer m is given, the method clusters the dominant m Schur vectors of the transition_matrix. The algorithm generates a fuzzy clustering such that the resulting membership functions chi are as crisp (characteristic) as possible, given m.

Instead of a single number of clusters m, a tuple or a dict {'m_min': int, 'm_max': int} containing a minimum and a maximum number of clusters can be given. This results in repeated execution of the G-PCCA core algorithm for \(m \in [m_{min},m_{max}]\). Among the resulting clusterings, the sharpest/crispest one (with maximal crispness) will be selected.

Parameters:

m (Union[int, Tuple[int, int], List[int], Dict[str, int]]) –

The number of clusters or a range where a search for potentially optimal cluster numbers is performed. Valid options are:

  • int: number of clusters to group into.

  • tuple: minimal and maximal number of clusters.

  • dict: minimal and maximal number of clusters given as {'m_min': int, 'm_max': int}.

See minChi() for selection of good (potentially optimal) number of clusters.

Return type:

GPCCA

Returns:

:

Returns self and updates the following attributes: