mescla.emma.archetypes.archetype_stability¶
- mescla.emma.archetypes.archetype_stability(X, n_archetypes, *, n_seeds=10, n_restarts=5, seed=0, standardize=True, **kwargs)[source]¶
Refit from different seeds and ask whether the same vertices come back.
The objective is not convex, so a single fit is an anecdote. For each pair of fits, every archetype of one is matched to its nearest archetype in the other and the distance recorded, in standardised units and relative to the spread of the samples themselves.
A relative displacement of a few per cent means the vertices are being found reliably. Large values mean the optimum is not well determined – most often because
n_archetypesis too large for the structure actually present, which makes this a rank diagnostic as much as a numerical one.