Tool to quickly compare the performance of a set of baseline ML methodologies.
Project description
cv_compare
Tool to quickly compare the performance of a set of baseline ML methodologies using cross-validation.
- GitHub | PyPI
- Created by Harry Hesketh-Prichard | GitHub @hprich80 | PyPI @hprich80
- MIT License
Installation
pip install cv_compare
Usage
from cv_compare import cv_compare
from sklearn.datasets import make_classification
X, y = make_classification(n_samples=500, random_state=1)
results = cv_compare(X, y, task='classification')
results.summary_table # ranked table of mean scores
results.plot() # boxplot of CV score distributions
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| X | array-like | required | Feature matrix |
| y | array-like | required | Target vector |
| model_task | str | 'classification' |
'classification' or 'regression' |
| models | list | None |
Replace default models with a custom list |
| add_models | list | None |
Append models to the default list |
| random_state | int | 1 |
Random seed |
| scaler | bool | True |
Apply StandardScaler to each pipeline |
| cv_scoring | str | None |
Sklearn scoring metric. Defaults to 'accuracy' for classification and 'neg_root_mean_squared_error' for regression |
Models included
Classification: KNN, Logistic Regression, Decision Tree, Random Forest, Bagging (DT), Bagging (RF), AdaBoost, Gradient Boosting, Voting Classifier
Regression: Linear Regression, Decision Tree, Random Forest, Bagging (DT), Bagging (RF), AdaBoost, Gradient Boosting, Voting Regressor
Development
git clone git@github.com:hprich80/cv_compare.git
cd cv_compare
pip install -e .
Run tests:
pytest
Author
cv_compare was created in 2026 by Harry Hesketh-Prichard.
Built with Cookiecutter and the audreyfeldroy/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cv_compare-0.1.0.tar.gz.
File metadata
- Download URL: cv_compare-0.1.0.tar.gz
- Upload date:
- Size: 93.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7edebeb893ac7fe4d8040c1c06b6f8f1fde3dd859f468aa3a114e0c9d9549b8
|
|
| MD5 |
47c00b365463c087386ac0912220a14e
|
|
| BLAKE2b-256 |
776126f55fd907c2a387a745bf1181a7ce6227761241b4770fc24a2711068825
|
File details
Details for the file cv_compare-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cv_compare-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdb7d2ce5ade88ac15124e4a27ea51a677cf300e988bd39442ef147cae499781
|
|
| MD5 |
564cf43ee35329fa7423e14bef62c326
|
|
| BLAKE2b-256 |
a0837e342fe426c8155a05c09cf08660d5d507a955f2e1b44747158be626f504
|