Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/kmeans n init #90

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
MABWiser CHANGELOG
=====================

February, 05, 2024 2.7.2
-------------------------------------------------------------------------------
minor:
- Fixed default KMeans n_init parameters instead of using 'auto' used in scikit-learn>=1.4

August, 02, 2023 2.7.1
-------------------------------------------------------------------------------
minor:
Expand Down
2 changes: 1 addition & 1 deletion mabwiser/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

__author__ = "FMR LLC"
__email__ = "[email protected]"
__version__ = "2.7.1"
__version__ = "2.7.2"
__copyright__ = "Copyright (C), FMR LLC"
4 changes: 2 additions & 2 deletions mabwiser/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def __init__(self, rng: _BaseRNG, arms: List[Arm], n_jobs: int, backend: Optiona
self.n_clusters = n_clusters

if is_minibatch:
self.kmeans = MiniBatchKMeans(n_clusters, random_state=rng.seed)
self.kmeans = MiniBatchKMeans(n_clusters, random_state=rng.seed, n_init=3)
else:
self.kmeans = KMeans(n_clusters, random_state=rng.seed)
self.kmeans = KMeans(n_clusters, random_state=rng.seed, n_init=10)

# Create the list of learning policies for each cluster
# Deep copy all parameters of the lp objects, except refer to the originals of rng and arms
Expand Down
Loading