custom clustering now takes position matrix instead of distance^2 matrix#87
custom clustering now takes position matrix instead of distance^2 matrix#87AdamOrmondroyd wants to merge 48 commits intoPolyChord:custom_clusterfrom
Conversation
…rix, to allow more general clustering algorithms
|
Have a feeling that I've got the indices for position_matrix backwards - will try check this afternoon |
…Lite into ormorod-custom_cluster
…. I believe this is consistent with m = number of dimensions, n = number of clusters
williamjameshandley
left a comment
There was a problem hiding this comment.
Many thanks for this @Ormorod.
I've tried to catch as many of the small errors as I can in this review. I would recommend combing through with git difftool with respect to master to check to see if there are any more instances which we've missed.
…Lite into ormorod-custom_cluster
…matrix where still required) to points
|
I think i've got it working again, will now swap the indices over... |
…Lite into ormorod-custom_cluster
This reverts commit e4622f5.
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] |
There was a problem hiding this comment.
Could you merge PolyChord:master into Ormorod:ormorod-custom_cluster so that the diff is cleaner?
There was a problem hiding this comment.
It would also be good to add a python test of clustering if you have time.
…nto ormorod-custom_cluster
|
I remembered that I had a translation of the native clustering into python down the back of the sofa, so have copied that into the new example and removed the sklearn dependence. I'll remove the redundancies (I don't think num_clusters_old gets used?) |
…k, so instead just return all of them (compute_nn()) and don't bother recalculating.
…e loop in disguise
* neighbor spelling (assuming we're sticking to American spelling!) * change NameError catch to check whether mpy4py was installed * set root=0 rather than erroneous root=root * Revert "neighbor spelling (assuming we're sticking to American spelling!)" This already appears in a different PR This reverts commit f1f52ed.
* neighbor spelling (assuming we're sticking to American spelling!) * change to checkoutv4 * change to checkout@v3 * change to pythonv4 * change to ubuntu-20.04 * return to latest ubuntu for 3.7 and 3.8, and separately include 3.6 case * include pythons up to 3.11 * enclose versions in quotes * revert spelling changes
|
this is so far behind, unnecessary, and is making me feel sick — closing to help tidy up |
This should allow more general clustering algorithms such as k-means.