Skip to content

Commit

Permalink
Merge pull request #58 from UBC-MDS/add-examples-to-docstring
Browse files Browse the repository at this point in the history
docs: added example usage to compare_model_scores docstring
  • Loading branch information
Abdul-Rahmann authored Jan 31, 2025
2 parents be0f782 + f751d68 commit e792d08
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 e792d08

Please sign in to comment.