mescla.emma.archetypes.archetype_rss_curve¶
- mescla.emma.archetypes.archetype_rss_curve(X, k_values=range(2, 7), *, n_restarts=5, seed=0, standardize=True, **kwargs)[source]¶
Residual sum of squares against the number of archetypes.
A rank criterion of a different kind from the eigenvalue rules in
mescla.emma.rank. Those ask how many dimensions carry variance; this asks how many vertices a simplex needs to enclose the data, which is nearer the question an EMMA is actually asking. Read it alongside them, not instead of them, and expect a gradual curve rather than a cliff: unlike the eigenvalue spectrum it has no null distribution behind it, so the elbow is a judgement.- Returns:
DataFrame – Indexed by
n_archetypes:rss,explained_variance, the increment in explained variance over the previous row, and the fraction of restarts that reached the best objective. That last column is itself a rank signal: it collapses once you ask for more vertices than the data support.- Parameters:
- Return type:
pd.DataFrame