Manuscript Offprint

arXiv:2611.00917

Benchmarking Classical Machine Learning Models for Shading-Fault Detection in Rooftop Photovoltaic Systems Using Real Sensor Data

Zablon Ombiro, Bernard Shibwabo

Abstract

Most published comparisons of machine-learning classifiers for photovoltaic (PV) fault detection are validated on simulated faults. We compare seven classical and ensemble-tree classifiers on the Réunion dataset, a 4 kW domestic rooftop plant on which shading faults were physically staged and logged. Readings within a staged episode are near-duplicates, so every train/test split is grouped by episode. A 20,800-row subsample that retains all 17 fault episodes was evaluated with three repeats of five-fold group-aware nested cross-validation, with synthetic minority oversampling (SMOTE) applied inside the training folds. Random Forest and XGBoost gave the highest mean accuracy (0.838 and 0.831) and Matthews correlation coefficient (MCC; 0.526 and 0.522). After Holm correction across the 21 pairwise Wilcoxon tests, only Random Forest's accuracy advantage over k-nearest neighbours and the multi-layer perceptron remained significant. Logistic Regression and the Decision Tree (accuracy 0.820) could be separated neither from the ensembles nor from the weakest models. SMOTE lowered binary MCC for six of the seven classifiers. Errors were concentrated in whole episodes: the Random Forest almost entirely missed four of the 17 fault episodes, including one of two uniform-shading and two of five intermittent-shading episodes. A post-hoc diagnostic shows that the no-fault rows were sampled over a wider range of times of day and output levels than the fault rows. Clock time alone reaches an MCC of 0.44, and PV-side voltage alone 0.72. The reported scores therefore reflect operating-condition differences as well as shading signatures. We release the pipeline and the diagnostics, and identify matched no-fault sampling as the step needed before the classifier ranking can be generalised.

Keywords: photovoltaic fault detection; shading faults; classifier comparison; group-aware cross-validation; class imbalance; SHAP

1 Introduction

Partial or uniform shading forces shaded cells into reverse bias. They then dissipate rather than generate power, and the resulting hot spots are a recognised fire-risk pathway. On small rooftop systems the loss is often invisible on a production dashboard, so detection has to come from the inverter's electrical measurements.

Classical and ensemble-tree classifiers are the usual baselines for this kind of tabular monitoring data, and several multi-model comparisons exist (Eldeghady et al., 2024; Khandeparkar et al., 2025; Mouleloud et al., 2025). Most of them use simulated faults, because fault-labelled field data are scarce. Field data bring a problem that simulation hides. A staged fault persists for minutes to hours, so adjacent readings are almost identical, and a random row-level split puts near-copies of the same reading on both sides of the train/test boundary. Rankings obtained

*Corresponding author: Zablon Ombiro, zablon.ombiro@strathmore.edu under such splits, or on simulated data, cannot be assumed to hold under field conditions. The closest real-data comparison we know of (Toche Tchio et al., 2024) does not group its splits and does not test differences between classifiers.

We use the Réunion dataset (Graillet et al., 2022), one of the few public records in which shading faults were staged and logged on an operating plant. Seven classifiers are compared under a protocol that keeps every episode wholly inside one fold, and the pairwise differences are tested with multiplicity correction. Four questions guide the analysis:

  • RQ1. Under episode-grouped evaluation, which classifiers perform best, and which differences survive statistical testing?

  • RQ2. Does SMOTE, applied inside the training folds, change the ranking or only the absolute scores, and does its effect depend on the model family?

  • RQ3. Which electrical signals drive the decisions, and is that consistent across model families?

  • RQ4. Do the less interpretable models give a measurable gain over Logistic Regression and a single Decision Tree?

The contributions are: (i) a seven-classifier benchmark on real staged shading faults; (ii) an episode-grouped nested evaluation, made tractable by documented subsampling; (iii) multi-metric results with Holm-corrected paired tests and effect sizes, and a per-model normalised SHAP comparison; and (iv) episode-level error analysis and confound diagnostics that bound how far the results generalise. The pipeline, results and diagnostics are public.

References (42)