Skip to content

Commit

Permalink
add tqdm to KElbowVisualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Parkhonyuk authored and Sergey Parkhonyuk committed Jun 8, 2020
1 parent 1879734 commit 5e341f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scipy>=1.0.0
scikit-learn>=0.20
numpy>=1.13.0
cycler>=0.10.0

tqdm>=4.43.0
## Optional Dependencies (uncomment to use)
#umap-learn>=0.3

Expand Down
5 changes: 3 additions & 2 deletions yellowbrick/cluster/elbow.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
except ImportError:
from sklearn.metrics import calinski_harabaz_score as chs


# add tqdm for progress visualization
from tqdm import tqdm
## Packages for export
__all__ = ["KElbowVisualizer", "KElbow", "distortion_score", "kelbow_visualizer"]

Expand Down Expand Up @@ -303,7 +304,7 @@ def fit(self, X, y=None, **kwargs):
self.elbow_value_ = None
self.elbow_score_ = None

for k in self.k_values_:
for k in tqdm(self.k_values_):
# Compute the start time for each model
start = time.time()

Expand Down

0 comments on commit 5e341f3

Please sign in to comment.