motiwari / BanditPAM

BanditPAM C++ implementation and Python package
MIT License
647 stars 38 forks source link

Remove use of global in `KMedoids::fit` #110

Open motiwari opened 3 years ago

motiwari commented 3 years ago

this uses a global algorithm.

Instead, it should take an optional argument and pass it if necessary (or store the value as a member variable)

Similarly in https://github.com/ThrunGroup/BanditPAM/blob/67221ff929d8005e46358a9151795b66bce66891/src/kmedoids_algorithm.cpp#L294-L301

And https://github.com/ThrunGroup/BanditPAM/blob/67221ff929d8005e46358a9151795b66bce66891/src/kmedoids_algorithm.cpp#L89-L97

motiwari commented 3 years ago

Not fully resolved since global algorithm and some others used throughout