-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add initial impl. from `CR.Sparse` * Rename file, add to __init__ * Initial fixed point iteration * Add random initialization * Better KMeansState * Fix `cond_fn` * First working version * Clean output, use `tree_map` * Remove reference impl. and dead code * Add TODO * Expose `cost_rank` in `PointCloud` * Add initial kmeans++ implementation * Fix indexing bug * Remove `set` methods * Add tolerance to convergence check * Rename function * Store inner errors * Unify kmeans initializer interface, allow custom * Reorder arguments * Add strict convergence criterion * Add convergence iteration to output * Simplify `cond_fn`, use `max_iter - 1` * Clip cosine distance to `[0, 2]` * Require sqEucl geometry, allow arrays * Fix random/kmeans++ init * Remove normalization comment * Fix dividing by 0 when using weights * Add TODOs * Fix k-means++ init centroid * Use `jax.tree_util.tree_map` * Rename arguments, use sum instead of mean * Switch order * Fix `unique_indices=True` in segment sum * Don't compute assignment in `init_fn` * Fix weighting * Use center shift as convergence criterion * Remove old TODOs * Improve final assignment * Fix centroid/weight adjustment * [ci skip] Allow geometry with cosine cost * Fix cosine conversion, add test * Add more cosine -> sqeucl conversion tests * Add documentation * Add skeleton tests * Add kmeans++ tests * Add k-means initialization test * Fix bug when removing empty centroids * Finish tests * Increase tolerance * Address comments * Use smaller eps
- Loading branch information
Showing
13 changed files
with
880 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.