Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Responding to queries from @tremblap about how well skmeans was behaving, this makes two changes
1
if the subsequent multiplication with the data is to yield usefully convergent means (well, sums in this case).This PR to be followed closely with an update to the initialisation.
Note to future me:
There's maybe a more Eigenonic way to do (2) that can get us a sparse matrix to make updating the means more efficient. But for now I've just kept the changes as small as possible.
(With this, we could probably also get rid of a separate
assignClusters
step, as that would be encoded in the sparse matrix. However, now that I re-read it, I see that there's a possible ambiguous situation when a column has two exactly equal values that are maxima...)