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)
Table 1: Code metadata.
Figure 1: A run of EasyClassifier . Each step is one or a few multiple-choice questions with a recommended default. The evaluation and the outputs need no decisions from the user.
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
k=5 ; six distances, Hassanat by default
Naive Bayes
scikit-learn (Gaussian)
–
Table 2: Classifiers in EasyClassifier 0.8.1. All use library defaults and a fixed random seed.
Figure 3: Two of the default figures from the run in Figure 2 , unedited. (a) Classifier comparison: one dot per test fold, a bar for the overall score, and the final nested-CV score of the selected classifier (diamond). (b) Confusion matrix of the nested cross-validation predictions, with counts and the percentage of each true class.
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
Table 3: Benchmark 1: balanced accuracy (%) estimated on the first half of each dataset and measured on the untouched second half (mean of three random splits). The external column is the truth for EasyClassifier ’s selected classifier; the naive estimate is compared with the external score of its own winner when computing its bias.
Figure 4: Bias of the three estimates (estimate minus performance on the untouched half; mean of three splits). Zero is honest; positive values are optimistic.
Figure 5: Balanced accuracy of KNN ( k=5 ) with each distance under EasyClassifier ’s automatic preprocessing, and three references on unscaled or standardised data (mean of ten test folds).
Data leakage remains a recurrent source of optimistic bias in biomedical machine learning studies. Standard row-wise cross-validation and globally estimated preprocessing steps are often inappropriate for data with repeated measurements, study-level heterogeneity, batch effects, or temporal dependencies. This paper describes bioLeak, an R package for constructing leakage-aware resampling workflows and for auditing fitted models for common leakage mechanisms. The package provides leakage-aware split construction, train-fold-only preprocessing, cross-validated model fitting, nested hyperparameter tuning, post hoc leakage audits, and HTML reporting. The implementation supports binary classification, multiclass classification, regression, and survival analysis, with task-specific metrics and S4 containers for splits, fits, audits, and inflation summaries. The simulation artifacts show how apparent performance changes under controlled leakage mechanisms, and the case study illustrates how guarded and leaky pipelines can yield materially different conclusions on multi-study transcriptomic data. The emphasis throughout is on software design, reproducible workflows, and interpretation of diagnostic output.
Selçuk Korkmaz
Department of Biostatistics and Medical Informatics, Faculty of Medicine, Trakya University, 22030 Edirne, Türkiye
Researchers increasingly use text classification--supervised models or large language models--to measure constructs from natural language, providing metrics such as recall and precision as evidence of their validity. Yet, though these metrics are point estimates subject to sampling variation, measures of uncertainty are inconsistently reported alongside them. Further, when they are reported, they are often estimated with methods that are not appropriate when relevant labelled datasets are small or performance is high. To increase and improve confidence interval reporting in the field, this paper evaluates confidence interval methods for performance metrics under conditions typical of social science text classification: small to moderate sample sizes, infrequent constructs, and texts nested within individuals. Across simulations, default methods such as the Wald interval and the basic percentile bootstrap are the least accurate, with coverage sometimes far below the nominal 95% level. Accuracy is improved with the use of Agresti-Coull, Wilson, Clopper-Pearson, and a novel pseudo-count regularized bootstrap (which is particularly relevant to the calculation of F1). When texts are nested within individuals, we demonstrate that adjustment for both effective N and the appropriate degrees of freedom is necessary for producing accurate analytic intervals. Among bootstrap intervals, the hierarchical bootstrap is more accurate than the cluster bootstrap when individuals produce a moderate number of texts but overly conservative when individuals produce only a few. By providing guidance to the field on appropriate interval estimation, we aim to improve the transparency of machine learning applications, and to encourage greater attention to the validation sample size at the design stage.
Kylie Anglin
Department of Educational Psychology, Neag School of Education, University of Connecticut
Small-to-medium scientific datasets place machine learning pipelines under two compounding pressures. Single-run feature selection produces feature sets that change substantially under small perturbations of the training data, and any procedure that uses the same data for selection, tuning, and evaluation produces optimistically biased performance estimates. The two failure modes are routinely treated as separable, but in the regimes where scientific data live, they interact: an unstable selection inflates the variance of an already-optimistic score, and standard remedies for one rarely address the other. RobustModelMaker is a Python framework that couples bootstrap stability selection with strict nested cross-validation, performs all preprocessing and selection inside each fold, and produces a stability-tested feature subset together with a leakage-safe performance estimate. The framework supports nine algorithms across binary classification, multiclass classification, and regression. Behaviour is verified by a deterministic test suite spanning unit, performance, and reproducibility checks on three real scientific datasets comparing to three alternative selectors (ANOVA F-test, recursive feature elimination with cross-validation, and Boruta) on both predictive score and a Jaccard measure of selection stability. RobustModelMaker is competitive in score with the best alternative selector on each dataset, and occupies a position on the joint score-stability frontier that none of the alternatives match across all three task types. Two example applications, ovarian cancer biomarker discovery from the PLCO Trial and critical-temperature regression on the UCI Superconductivity Data, illustrate how the framework is used in practice and what trade-offs become visible when stability is treated as a first-class deliverable rather than an emergent property.
Amanda S Barnard
School of Computing Australian National University Acton, ACT 2601