kmeans_pytorch icon indicating copy to clipboard operation
kmeans_pytorch copied to clipboard

fix 'center_shift=nan' bug and add a dependency 'numba' for installing from source

Open yangnianzu0515 opened this issue 1 year ago • 0 comments

Dear,

When running the code, I also encountered the "center_shift=nan" bug (which was also reported in issue #3). I would like to thank @GenjiB for identifying the issue: "If a cluster_center is an outlier, there are no neighbor points to calculate the mean point. To calculate the mean of none points results in Nan."

@GenjiB also proposed a solution that worked for me. To facilitate the use of this solution by others, we have modified the source code accordingly. Additionally, we found that numbda needs to be installed before running the code from source, and we have added a corresponding prompt in the ReadMe file.

Best regards, Nianzu Yang

yangnianzu0515 avatar May 09 '23 08:05 yangnianzu0515