Skip to content

Commit

Permalink
docs: added example usage to compare_model_scores docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mdahewlett committed Jan 31, 2025
1 parent be0f782 commit f751d68
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mds_2025_helper_functions/scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ def compare_model_scores(*args, X, y=None, scoring=None, return_train_scores=Fal
- Rows represent different models.
- Columns include metrics from cross-validation.
- Index contains model names.
Examples
--------
>>> from sklearn.linear_model import LogisticRegression
>>> from sklearn.ensemble import RandomForestClassifier
>>> compare_model_scores(LogisticRegression(), RandomForestClassifier(), X=X_train, y=y_train, scoring="accuracy")
"""
# Check for at least 2 models to compare
if len(args) <= 1:
Expand Down

0 comments on commit f751d68

Please sign in to comment.