Banditpam

Latest version: v4.0.4

Safety actively analyzes 702253 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

3.0.3

This contains BanditPAM `v3.0.3`. This update will be largely invisible to users, but allows for building the Linux and Mac (including Apple Silicon/M1) wheels to upload to PyPi.

Organization and Functionality:
- Building wheels automatically for Linux, Intel Mac, and M1 Mac and uploading them to PyPI via Github actions

Tests:
- None, other than verifying the changes in `Organization and Functionality` work via Github Actions

Style:
- Including newlines between steps of Github Actions

Documentation:
None


**Full Changelog**: https://github.com/ThrunGroup/BanditPAM/compare/v3.0.2...v3.0.3

3.0.2

**Organization and Functionality:**
- We now allow the user to set a `seed` for reproducible results (must be called with `banditpam.set_num_threads(1)` for deterministic reproducibility) (Fixes 176)
- We have added the `KMedoids.average_loss` attribute to contain the final average clustering loss after fitting (Fixes 174)
- We throw an `std::invalid_argument` error properly when specifying an invalid loss function (Fixes 173, Fixes 141)


**Tests:**
- We now also test `PAM` in `tests/test_smaller.py`

**Style:**
- We change `PAM` and `FastPAM1` to use `this->*lossFn` instead of `KMedoids::cachedLoss` to avoid resetting the cache for them; they do not benefit much from a cache anyway
- Nits

**Documentation:**
- Created documentation for new functions

**Full Changelog**: https://github.com/ThrunGroup/BanditPAM/compare/v3.0.1...v3.0.2

3.0.1

BanditPAM v3.0.1 contains a hotfix to ensure it can be installed on Paperspace Gradient and Google Colab.

For Paperspace Gradient:

- allows users to install` banditpam==3.0.1` on Paperspace Gradient instances by installing the necessary dependencies and armadillo 10.8 automatically in setup.py
- Builds a recent (>=10.8) armadillo from source

For Google Colab:
- Installs the necessary Ubuntu dependencies
- Fixes a missing space that was conjoining the repo name with the local installation path
- Replaces the MANIFEST.in so the headers are properly included in the source distribution

**Full Changelog**: https://github.com/ThrunGroup/BanditPAM/compare/v3.0.0...v3.0.1

3.0.0

**Organization and Functionality:**
- doubles are changed to floats throughout

**Tests:**
- Python3.10 has been added to the list of python versions to check
- We now verify the package can be built on MacOS
- We separate the different tests into different files

**Style:**
- We use the appropriate armadillo types throughout for floats

**Documentation:**
- We have updated the documentation through
- We updated the favicon on readthedocs
- We have updated the installation guides throughout](https://github.com/ThrunGroup/BanditPAM/releases/new)

**Full Changelog**: https://github.com/ThrunGroup/BanditPAM/compare/v2.0.0...v3.0.0

2.0.0

**Organization and Functionality:**
- Everything has been migrated to the namespace `km` for better encapsulation (Fixes 135)
- We now allow for <100 datapoints by setting the `batchSize` to `min(dataset_size, 100)` (Fixes 158)
- We now return `int`s for the medoid indices instead of `float`s, including a list of a single `int` if `k=1` (Fixes 152)
- We reformatted the functions in each `.cpp` file to appear in the same order they appear in the corresponding `.hpp`
- The code has been refactored for better organization
- The code in `setup.py` is now encapsulated (Fixes 131)
- The check for LLVM clang is now back in `setup.py` (Fixes 79)
- Attempting to set the build or swap confidences when not using the BanditPAM algorithm results in an error

**Tests:**
- The code's accuracy is now automatically checked by running test cases via Github actions (Fixes 52)
- An error is now thrown if an empty dataset is passed
- We now use FastPAM1 instead of PAM for the tests, which significantly speeds them up
- We added additional functionality to the tests to error quickly on failures
- The code is now tested on Python3.9 via Github actions (Fixes 46)

**Style:**
- We have changed variable names to `camelCase` for C++ variables (Fixes 140)
- The code is now automatically checked for style compliance via Github actions
- The python code now contains typehints
- `const` qualifiers have been added where possible

**Documentation:**
- We now publicly host the documentation on ReadTheDocs, via an integration with Sphinx (Fixes 165, Fixes 124)
- We have updated the `README` with links to the ReadTheDocs and SAIL blog post
- We have deleted duplicate docstrings in the `.cpp` files, moved all docstrings to the `.hpp` files, updated the docstrings, and added the necessary `throws` and `returns` (Fixes 127)

**Full Changelog**: https://github.com/ThrunGroup/BanditPAM/compare/v1.0.5...v2.0.0

1.0.5

- Removes all logging and the `verbosity` flag, which were unnecessary
- Enables users to install the package via `pip` on Google Colab (by using prebuilt `armadillo` libraries and copying them over to the correct places)
- Bumps the version to `v1.0.5`
- Cleans up some nits

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.