EasyClassifier: Honest, Reproducible Machine-Learning Classification for Researchers Who Do Not Program
Organizations: Faculty of Information Technology, Mutah University, Karak, Jordan · Department of Accounting, Mutah University, Karak, Jordan
Abstract
Machine-learning classification is now used across medicine, the social sciences, economics, education and engineering, very often by researchers who do not program. Two errors recur in such work: preprocessing learned on all rows before cross-validation (data leakage), and reporting the cross-validation score of the classifier that won a comparison (selection bias). Both make published scores optimistic. We present EasyClassifier, an open-source Python package that guides a user from a CSV or Excel file to a finished analysis through a sequence of plain-language, multiple-choice questions, with no code. It makes the correct procedure the default rather than an option: every preprocessing step is learned inside each training fold; the selected classifier receives a separate final score from nested cross-validation (up to 2,000 rows), or an untouched 20% test set; classifiers run with fixed default parameters and fixed random seeds; and every run writes a report with a ready-to-adapt Methods paragraph, the references to cite, and figures prepared for publication. On ten public datasets from seven fields and a random-label control, split in half so that one half served as an untouched external test, the common practice overstated balanced accuracy by 2.9 percentage points on average (up to 9.9 on small data), whereas the score EasyClassifier reports had a mean signed bias of +0.7 points and a mean absolute error of 2.3 points (one-sided Wilcoxon p = 3.2 x 10^{-4}, 30 runs). On random labels it reported 48.8% balanced accuracy against a chance level of 50%. EasyClassifier is available under the MIT license from PyPI (pip install easyclassifier), GitHub, and Zenodo.
Figures & tables
| Current version | 0.8.1 |
|---|---|
| Code repository | https://github.com/ahmadhassant/easyclassifier |
| Archived version (DOI) | 10.5281/zenodo.23122902 |
| Package | https://pypi.org/project/easyclassifier/ |
| License | MIT |
| Language and requirements | Python 3.10; pandas, NumPy, scikit-learn, matplotlib, joblib, openpyxl; optional XGBoost, LightGBM, and a LaTeX distribution for the PDF report |
| Platforms | Windows, macOS, Linux (tested automatically on all three, Python 3.10–3.14) |
| Classifier | Implementation | Settings that differ from the library default |
|---|---|---|
| Decision tree | scikit-learn | – |
| Random forest | scikit-learn | – |
| Support vector machine | scikit-learn (RBF kernel) | probability estimates enabled (for ROC curves) |
| Logistic regression | scikit-learn | up to 1,000 iterations |
| K-nearest neighbours | EasyClassifier distances | ; six distances, Hassanat by default |
| Naive Bayes | scikit-learn (Gaussian) | – |
| Dataset | Naive | Comparison best | EasyClassifier final | External (truth) |
|---|---|---|---|---|
| Breast cancer (Wisconsin) | 97.4 | 98.1 | 97.7 | 96.1 |
| Pima diabetes | 73.8 | 73.8 | 71.8 | 71.9 |
| Low birth weight | 63.8 | 63.8 | 57.5 | 55.0 |
| Iris flowers | 97.3 | 96.9 | 95.5 | 92.0 |
| Wine cultivars | 98.0 | 98.4 | 96.8 | 97.9 |
| Handwritten digits (8 8) | 97.5 | 97.3 | 96.5 | 97.3 |