Skip to content

Commit

Permalink
Add progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Bougeant committed Oct 18, 2024
1 parent dc4a222 commit 6520227
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ml_inspector/partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pandas as pd
from plotly import graph_objs as go
from plotly.colors import DEFAULT_PLOTLY_COLORS
from tqdm.auto import tqdm


def select_feature_values(X, feature, max_nb_points):
Expand Down Expand Up @@ -136,7 +137,7 @@ def plot_partial_dependence(
"""
plot_data = []
visible = True
for feature in X.columns:
for feature in tqdm(X.columns, desc="Calculating partial dependence"):
feature_values, all_predictions, all_impacts = partial_dependence(
estimator,
X,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies = [
"pandas",
"scikit-learn",
"plotly",
"tqdm",
]


Expand Down

0 comments on commit 6520227

Please sign in to comment.