motiwari / BanditPAM

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

Update sigma by re-assigning it at call sites #129

Closed mailology closed 3 years ago

mailology commented 3 years ago

I have changed logic of sigma update by returning the desired values and re-assigning sigma at call sites. The relevant functions are

  1. build_sigma: a row vector updated_sigma is created to store the sigma values and returned at the end;
  2. swap_sigma: a matrix updated_sigma is created to store the sigma values and returned at the end.

The updated code is checked on Python using MNIST-1k dataset. All algorithms give expected results including the sigma values in the log files.