Next Article in Journal
Hydroxyl Radical Generation in Heterogeneous Fenton Reaction and Its Interaction with Nanoplastics as Potential Advanced Oxidation Process
Previous Article in Journal
Integrated Analysis of Tectonic Evolution and Hydrocarbon Potential in the Aonan Sag, Northern Songliao Basin: Insights from Rift-Phase Structural Controls
Previous Article in Special Issue
A New Control Tracking Approach for the Congestion Problem of a TCP System Based on Nonlinear Sliding Mode Control
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hyperspectral Classification of Kiwiberry Ripeness for Postharvest Sorting Using PLS-DA and SVM: From Baseline Models to Meta-Inspired Stacked SVM

by
Monika Janaszek-Mańkowska
1 and
Dariusz R. Mańkowski
2,*
1
Institute of Mechanical Engineering, Warsaw University of Life Sciences, Nowoursynowska 164 St., 02-787 Warsaw, Poland
2
Plant Breeding and Acclimatization Institute–National Research Institute in Radzików, Department of Applied Biology, 05-870 Błonie, Poland
*
Author to whom correspondence should be addressed.
Processes 2025, 13(11), 3446; https://doi.org/10.3390/pr13113446
Submission received: 11 September 2025 / Revised: 9 October 2025 / Accepted: 24 October 2025 / Published: 27 October 2025

Abstract

The accurate and non-destructive assessment of fruit ripeness is essential for post-harvest sorting and quality management. This study evaluated a meta-inspired classification framework integrating partial least squares discriminant analysis (PLS-DA) with support vector machines (SVMs) trained on latent variables (sSVM) or on class probabilities (pSVM) derived from multiple PLS-DA components. Two kiwiberry varieties, ‘Geneva’ and ‘Weiki’, were analyzed using variety-specific and combined datasets. Performance was assessed in calibration and prediction using accuracy, F05, Cohen’s kappa, precision, sensitivity, specificity, and likelihood ratios. Conventional PLS-DA provided reasonably good classification, but pSVM models, particularly those with an RBF kernel (pSVM_R), consistently outperformed other approaches and ensured higher stability across all datasets. Unlike sSVMs, which were prone to overfitting, pSVM_R models achieved the highest accuracy of 92.4–96.9%, Cohen’s kappa of 84.8–93.9%, and precision of 89.1–94.2%, clearly surpassing both score-based SVM and PLS-DA. Contrasting tendencies were observed between cultivars: ‘Geneva’ models improved during prediction, while ‘Weiki’ models declined, especially in specificity. Combined datasets provided greater stability but slightly reduced peak performance than single-variety models. These findings highlight the value of probability-enriched stacking models for non-invasive ripeness discrimination, suggesting that adaptive or hybrid strategies may further enhance generalization across diverse cultivars.

1. Introduction

Actinidia arguta (Siebold et Zucc.) Planch. ex Miq., commonly referred to as kiwiberry or minikiwi, is a climacteric fruit valued for its exceptional sensory and nutritional properties [1,2,3,4]. It is particularly rich in vitamin C, polyphenols, carotenoids, and other bioactive compounds that contribute to its classification as a “superfruit” [5,6]. In Poland, commercial cultivation has developed over the last 25 years, with varieties ‘Weiki’, ‘Geneva’, and ‘Bingo’ gaining the greatest commercial importance [4,7].
Despite its potential, kiwiberry remains a commercially challenging fruit. Its short storage life, high susceptibility to uneven ripening, and seasonal availability limit market expansion and profitability [8,9]. In the Polish climate, fruits are typically harvested at the stage of harvest maturity, when they are still firm and sour, and then undergo rapid and heterogeneous ripening after harvest [10]. This variability makes post-harvest sorting according to ripeness a key step for extending market supply, reducing losses, and ensuring uniform fruit quality.
Traditional assessment of soluble solids content (SSC), the main ripeness indicator in Actinidia spp., relies on destructive refractometric measurements [11,12,13]. Therefore, non-destructive technologies are required for practical implementation on sorting lines. This requirement can be successfully met by solutions based on vision techniques, particularly hyperspectral imaging. This approach has proven to be an effective quality control tool, integrating spectral and spatial information for the rapid and non-invasive assessment of examined objects. Recent studies have demonstrated the effectiveness of HSI in predicting the quality of Actinidia ssp., including their health [14,15,16], texture [17,18], maturity [19,20,21,22], soluble solid content and acidity [23,24,25], or storage condition [26,27].
For spectral data modeling, partial least squares (PLS) and its variant PLS-DA are widely used, providing dimensionality reduction and interpretable class separation [20,28]. These methods, increasingly applied to hyperspectral images with high collinearity and redundancy [29]. They facilitate spectral interpretation and create a solid basis for integrating advanced machine learning techniques.
PLS-DA extends PLS regression to classification tasks, offering dimensionality reduction and class separation in high-dimensional and collinear datasets. Unlike principal component regression (PCR), PLS explicitly incorporates information from predictors and responses, improving class discrimination. The optimal number of latent components is typically chosen by cross-validation [30,31,32,33].
On the other hand, the high dimensionality and collinearity of spectral data encourage the use of advanced machine learning algorithms and automated variable selection methods such as CARS, BoSS, GA, VIP, or SPA [19,20,21,24,34,35,36]. Such approaches reduce redundancy and capture nonlinear relationships beyond the reach of traditional models. Support vector machines (SVMs) are particularly effective in this context. This method offers strong generalization in high-dimensional feature spaces and robustness to nonlinear class boundaries through kernel functions such as linear or radial basis function (RBF) [37,38,39]. Their ability to define complex decision margins makes them well-suited for hyperspectral applications [25,40,41]. Moreover, stacking or meta-learning strategies that combine SVM with feature extraction may further enhance performance, providing a promising direction for ripeness-based kiwiberry sorting.
While hyperspectral imaging has been widely explored for fruit quality evaluation, the choice and design of classification strategies remain critical for practical implementation. Previous studies often rely on single classifiers or raw spectral inputs, overlooking the potential of combining feature extraction with robust machine learning models. This study addresses this gap by systematically comparing PLS-DA, SVM with different kernels, and hybrid SVM-PLS approaches, providing insights into their relative performance and suitability for automated kiwiberry sorting. The novelty of this work lies in its integrated evaluation of multiple strategies, applied for the first time to Actinidia arguta, a fruit species still rarely studied in post-harvest management. Notably, PLS-based methods are particularly well-suited for high-dimensional data typical of hyperspectral analyses, where the number of predictors substantially exceeds the number of observations. In this context, hyperspectral imaging does not precisely quantify individual chemical constituents, but captures spectral patterns that enable object classification, grouping, and similarity assessment in post-harvest sorting processes.
Therefore, this study aimed to evaluate a meta-inspired classification framework combining multiple modeling strategies to classify kiwiberry fruits according to their ripeness. Specifically, we compared classical PLS-DA, SVM models trained on latent variables extracted from PLS-DA (sSVM), and SVM models leveraging class probabilities (pSVM) derived from multiple PLS-DA models with varying numbers of components, each validated by random 10-fold cross-validation. This approach enabled a systematic assessment of the potential of integrating hyperspectral imaging with advanced classification techniques for optimized post-harvest fruit sorting. pSVMs may be considered stuck models, since they rely directly on the original feature space and are constrained by the geometry of the raw predictors, while sSVMs operate in a transformed latent space derived from PLS-DA scores, which changes the numerical nature of the optimization problem and alters the generalization behavior. The study underscores the importance of model architecture and feature extraction in advancing non-invasive post-harvest fruit sorting systems.

2. Materials and Methods

2.1. Collection and Preparation of Kiwiberry Samples

The fruits of A. arguta represent two varieties, ‘Weiki’ and ‘Geneva’, which were used to develop classifiers. Fruits originated from a commercial plantation in Bodzew, along Grójec, Mazowieckie voivodship, Poland (51°47′50″ N, 20°48′43″ E; USDA hardiness zone 6b). Harvests were carried out in 2021 and 2022 in early September. Fruits were collected randomly at the harvest maturity stage, with an SSC of 6.5–7% [8,9]. Fruits were kept at 1 °C and 90% relative humidity and monitored for up to several days to capture ripeness variations, beginning on the day of harvest. From this batch 5938 samples were chosen randomly and employed for model development, comprising 3810 ‘Weiki’ fruits and 2128 ‘Geneva’ fruits, the latter of which were collected exclusively in 2022. The experimental protocol, including fruit storage, initial sample preparation, acquisition and preliminary processing of hyperspectral images, and measurement of fruit extract, was identical in both study years and similar to those described by Janaszek-Mańkowska and Ratajski [42].

2.2. Hyperspectral Imaging Setup

The hyperspectral imaging setup (HIS) employed a push-broom line scanning technique and consisted of two hyperspectral cameras, FX10 (CMOS detector) and FX17 (cooled InGaAs detector) from SPECIM Ltd. (Oulu, Finland), a 250 W halogen lamp, and an external PC. The FX10 camera operated in the 400–1000 nm range (visible near-infrared, VNIR) with 448 spectral bands, while the FX17 covered 900–1700 nm (short-wave infrared, SWIR) with 224 bands. To reduce external light interference, all HIS components except the PC were enclosed in a vision chamber, which was the core of the prototype kiwiberry sorting device and also consisted of forced air exhaust system and four transducers (F&F, model MB-AHT-1) connected to a PLC (Siemens, S7-1214C) to monitor and prevent overheating from the halogen lamp (Figure 1). Both cameras were placed above a conveyor belt, moving randomly positioned fruits at 40 mm/s. The optical axis of FX10 was perpendicular to the conveyor, while FX17 was tilted ~12° to capture the same sample area. The halogen lamp was positioned at a 45° angle. Both cameras acquired 12-bit images with mean spectral resolutions of 1.32 nm (FX10) and 3.57 nm (FX17).

2.3. Processing Workflow for Hyperspectral Reflectance Data

The OpenCV custom application supported the automatic acquisition of hyperspectral cubes of each fruit and further image pre-processing. In order to correct for spectral light variations, sensor sensitivity, and dark current, radiometric calibration was performed using dark and white reference images (0% and 99% reflectance, respectively) as proposed by Xiong et al. [43]:
I C = I O I D I W I D ,
where IC and IO are the calibrated and original images, ID is the dark reference (camera shutter closed, light off), and IW is the white reference (PTFE tile imaged before each cycle under the same light conditions as IO).
Each hypercube was sliced into 16-bit 2D images, representing reflectance in individual spectral bands. Although hyperspectral images initially covered the full ranges recorded by both cameras, bands with low signal-to-noise ratio (SNR), poor discriminative capacity, observed mainly at the ends of the SWIR range, or redundancy due to spectral overlap were discarded after preliminary inspection. Only bands within ~490–909 nm and ~977–1379 nm were retained for further analyses. In the sequence of selected 2D images corresponding to each fruit, a region of interest (ROI) was defined to include only the fruit, and subsequent image processing steps were applied exclusively within this ROI. At the same time, the remaining background was excluded from analysis. ROI location, which covered the entire fruit surface, was specified separately for VNIR and SWIR image sequences using the IsoData binary threshold [44] on hypercube slices with the highest contrast between background and sample reflectance. For each waveband λ, the mean reflectance within the ROI was calculated according to Formula (2):
R ¯ λ = p = 1 n R p n ,
where R ¯ λ is the mean reflectance within the ROI for a given wavelength λ, Rp is the reflectance of the n-th pixel, and n is the total number of pixels.
Although calibration reduces many artifacts, spectral data can still be affected by baseline drift, nonlinearity, or scattering effects, which introduce noise unrelated to the actual signal. Several pre-processing techniques were applied separately to the VNIR and SWIR ranges to address these disadvantages. These included Multiplicative Scatter Correction (MSC), Standard Normal Variate (SNV), Savitzky–Golay (SG) smoothing, mean centering (MC), and spectral derivatives of the first (D1) and the second order (D2). For SG filtering, a frame size of 15 was used, corresponding to bandwidths of 18.56 nm (VNIR) and 48.52 nm (SWIR). Derivatives, calculated after SG smoothing with low-order polynomial fitting, were used to reduce baseline and slope effects while improving the resolution of overlapping features. MSC compensated for scatter by aligning spectra with a reference [45,46], whereas SNV normalized each spectrum relative to its mean and standard deviation [47]. MC emphasized spectral variation by shifting each spectrum relative to the overall average. SG filtering smoothed the signal through polynomial convolution [48]. Derivatives further corrected baseline and slope shifts, though smoothing was essential to limit noise amplification [46,49]. All these corrections were implemented in R version 4.5.1 using the mdatools package [50,51].

2.4. Determination of SSC as a Ripeness Index

SSC served as the reference index of kiwiberry ripeness. Following hyperspectral image acquisition, fruit juice was extracted and analyzed with a digital refractometer (ATAGO, PAL-1, Tokyo, Japan), providing ±0.1% accuracy within the 0–53° Brix range. Measured SSC values spanned from 4.4% to 17.1% (mean 8.02 ± 2.5%) for ‘Weiki’ fruits and from 4.3% to 13.6% (mean 7.82 ± 1.7%) for ‘Geneva’ fruits, thus covering a broad maturity spectrum, including levels exceeding commercial standards.

2.5. Data Preparation

Data obtained from hyperspectral images were organized into datasets corresponding to the kiwiberry variety. Class of fruit ripeness was defined based on SSC so that samples with SSC ≤ 7% were assigned to the unripe class (A—positive class), whereas the remaining fruits were classified as ripe (B—negative class). The class label was treated as the dependent variable, while the predictor set comprised 425 spectral variables, including 309 wavebands from the VNIR range and 116 from the SWIR range. Three datasets were prepared: (i) ‘Weiki’ variety data (W) from two harvest years, (ii) ‘Geneva’ variety data (G), and (iii) a combined dataset including both ‘Geneva’ and ‘Weiki’ varieties (WG). Each dataset was split into training and test subsets in a 4:1 ratio (80% training, 20% test). The training part was used to calibrate classification models, while the independent test set served as external validation of model performance. Stratified random sampling was performed with the createDataPartition function from the caret package [52] of R version 4.5.1, ensuring balanced class proportions in training and test subsets. Model calibration relied on training datasets (with internal cross-validation applied during training), whereas test data were used for prediction. In this context, ‘calibration’ refers to model optimization and evaluation based on cross-validated training results, while ‘prediction’ denotes the assessment of the final model on the independent test set. Detailed information on the datasets’ structure is summarized in Table 1.
Following the data partition, spectral preprocessing (MSC, SNV, SG, MC, D1, D2) was applied, yielding 18 training—test set pairs for subsequent analyses. Preprocessing was performed separately for training and test subsets to avoid data leakage.

2.6. PLS-DA and SVM Classification

Classification models were implemented in R version 4.5.1 using caret package, which applied the pls package for PLS-DA [53] and the kernlab library for SVM [54,55]. Model calibration was consistently performed using random 10-fold cross-validation on the training set to prevent overfitting. The modeling procedure consisted of two main stages. First, PLS-DA was employed to obtain independent classifiers, which also served as a Level-0 models to provide a set of latent variables (scores) as well as winning class probabilities for subsequent Level-1 SVM models developed in the second stage. The idea of Level-0 and Level-1 generalizers is given in [56]. The optimal number of PLS components in each model was determined based on the kappa statistic [57], defined as follows:
κ % = 100 × p o p e 1 p e ,
where po, which denotes the observed agreement (proportion of correctly classified samples), is given as:
p o = 1 n i = 1 k T P i ,
and pe denotes the expected agreement by chance, calculated from the marginal distributions of the confusion matrix as follows:
p e = i = 1 k T P i + F N i T P i + F P i n 2 ,
where TPi, FPi, and FNi denote the elements of the confusion matrix shown in Table 2 for class i, and n is the total number of observations.
Table 2 presents a confusion matrix for binary classification with positive class A (unripe fruits) and negative class B (ripe fruits), where TP and TN denote the number of correctly classified samples, whereas FP and FN indicate the number of misclassifications [58].
The optimal number of PLS components typically amounted to 18 or 20, indicating relatively high model complexity. Thus, for subsequent analyses with SVM classifiers based on scores (sSVM), the maximum number of latent variables extracted from the training set was capped at 20, and test set scores were calculated using the corresponding loading weights, ensuring that both datasets were represented in the same latent space. Thereby, the dimensionality of the input space was reduced from 425 original spectral variables to 20 scaled and transformed latent predictors. Moreover, considering the most common optimal number of latent variables (20), an additional 18 alternative and independent PLS-DA models were fitted, with the number of components increased stepwise by one, starting from 3. For each PLS-DA model, class probabilities for the winning class (class A) were computed separately for the training and test sets. The probabilities derived from the training set were subsequently used as predictors in SVM models (pSVM), whereas those obtained from the test set were retained exclusively for their independent validation. Therefore, pSVMs may be considered stacked models similar to description by Ting and Witten [56], as they operated on meta-level inputs rather than raw or transformed predictors. By contrast, sSVMs relied directly on latent variables, linear combinations of the original spectral features.
In the second stage, SVM classifiers with linear (SVM_L) and radial (RBF) kernels (SVM_R) were developed, but the latter were used only with pSVM variants. This decision was based on the linear nature of the latent variables, which are constructed to maximize class separation. Introducing a nonlinear kernel would likely add complexity without improving separability, as linear boundaries are already sufficient in the latent space [59]. While the behavior of RBF kernels in this context is of academic interest, their inclusion was deemed unnecessary for practical model development. For SVM_L models, the regularization parameter C was optimized, whereas for SVM_R models, both C and γ (the kernel width parameter) were tuned. Parameter optimization was done by exhaustive grid search to maximize the κ statistic in a random 10-fold cross-validation. Based on the provided training data, candidate grids were generated automatically using 20 values for each parameter. The selection of components in sSVM_L models was constrained to sequential combinations (e.g., 1–3 or 1–5), while irregular patterns (1, 4, 8) were excluded. Our decision was motivated by the inherent structure of PLS components, where successive latent variables explain progressively smaller portions of the shared variance, and skipping intermediate components would lead to less coherent models.

2.7. Evaluation of Classification Performance

Standard classification metrics, such as accuracy (ACC), sensitivity (TPR), specificity (TNR), precision (PPV), the F05 score, and likelihood ratios (LR+ and LR) were applied to evaluate model classification capacity [60,61]. While ACC provides a general indication of classifier performance, it may miss systematic class imbalances. Therefore, a broader set of complementary measures was employed better to capture the trade-offs between false positives and false negatives. In the context of fruit maturity assessment in our study, misclassifying ripe fruits as unripe is generally considered more detrimental than the opposite case. This is because the presence of ripe fruits accelerates postharvest ripening of the entire batch, potentially compromising storage stability and marketability. Although explicit cost-sensitive learning was not introduced, this asymmetry in error perception motivated the use of metrics that emphasize precision and penalize false positives more strongly, such as the F05 score. Similarly, sensitivity and specificity were reported to provide a balanced view of correct recognition in both classes, and kappa was included as a robust, prevalence-independent summary statistic. Finally, likelihood ratios were calculated, as they directly relate classifier output to practical decision-making in diagnostic-style settings. Based on confusion matrix from Table 1, evaluation metrics for classifiers were calculated as follows:
A C C % = 100 × T P + T N n ,
T P R % = 100 × T P O P ,
T N R % = 100 × T N O N ,
P P V % = 100 × T P P P ,
F 05 = 1 + β 2 × P P V × T P R β 2 × P P V + T P R , β = 0.5 ,
L R + = T P R 1 T N R ,
L R = 1 T P R T N R
where β controls the relative weight assigned to precision and sensitivity, which are indirectly linked to misclassification costs. If recognition of the winning class and its purity are equally important (β = 1), the measure is denoted as F1. A higher emphasis on sensitivity (β = 2) results in F2, whereas a stronger weight on precision (β = 0.5) yields F05.
For additional statistical validation of the best-performing models, 95% bootstrap confidence intervals for accuracy, κ, PPV, TPR, and TNR, as well as McNemar’s tests for paired model comparisons, were computed and are reported in the Appendix A (Table A3 and Table A4, respectively).
We measured the time required to generate predictions on the test samples to evaluate whether the classification performance improvement justifies the meta-models’ additional complexity. Median times from 100 repetitions are reported for each stage and per sample in Table A5 (Appendix A).
All computational analyses were performed on a standard personal computer (Lenovo, Morrisville, NC, USA, Intel i5-10400F CPU 2.90 GHz, 16 GB RAM, no GPU).

3. Results

Classification outcomes presented in this section were obtained for kiwiberry samples (5938 fruits in total: 3810 ‘Weiki’ and 2128 ‘Geneva’) using PLS-DA and SVM models. Analyses were performed separately for each dataset, and multiple preprocessing variants were considered to assess their impact on model performance. Models developed with PLS-DA were treated as the basis, whereas SVMs were assessed for potential improvements in classification performance. The following subsections present calibration and prediction results for the best-performing models in terms of classification metrics, organized according to the individual datasets. This approach allows a clear comparison of the predictive capabilities of the different modeling strategies and highlights the impact of using latent variables and model stacking on classification performance.
Calibration (cross-validated model tuning) and independent test set prediction results for all combinations of model and preprocessing variant are provided in Table A1 (Appendix A). Confusion matrices for the best-performing models and Area Under the Curve (AUC) values are reported in Table A2 (Appendix A). In addition, Receiver Operating Characteristic (ROC) curves were calculated to further assess classifier discrimination performance (Appendix A, Figure A1). Finally, representative spectral data, averaged across SSC intervals on the Brix scale (4–6, 6–8, …, 16–18), illustrate typical differences between unripe and ripe fruits (Appendix A, Figure A2).

3.1. Classification Results of ‘Geneva’ Kiwiberry

The classification models for ‘Geneva’ fruits were developed using single-year data, which limited their ability to account for seasonal variability. Moreover, the training set accounted for approximately 55% of the total cases available in the W dataset. Table 3 summarizes the performance of the best classifiers during calibration and prediction on the independent test set.
Among all preprocessing variants, the baseline G_PLS-DA model developed on D2 spectra yielded the best calibration results, with ACC = 89.67%, κ = 79.34%, and F05 = 87.38. The PPV was 85.6%, indicating the probability that a positive result corresponds to unripe fruit. TPR was 95.42% and exceeded TNR by 11.5%, reflecting a tendency of the model to produce false positives (FPs). This was also confirmed by the values of the model likelihood ratios, especially the LR+ of 5.93, indicating that for every 100 correctly classified unripe fruits, approximately 16.9 ripe ones (100/LR+ if classes are balanced) were misclassified. This corresponds to a 16.9% risk of incorrectly confirming unripe fruits upon a positive result. At the same time, the LR of 0.05 corresponds to a 94.5% chance of correctly excluding unripe fruits upon a negative result. During prediction, the G_PLS-DA model achieved slightly better performance with ACC of 92.22% and F05 of 89.84, while TPR and TNR reached 97.64% and 86.79%, representing an average increase of approximately 2.5%. The balanced improvement in TPR and TNR also increased κ to 84.43% with a gain of 5.09%. Consequently, the risk of misclassifying ripe fruits decreased by 3.3%, while the chance of correctly excluding unripe fruits with a negative result increased by 2.7%.
The best G_sSVM_L classifier also used D2 data. It outperformed the baseline G_PLS-DA model during calibration, primarily due to improved TNR of 88.26%, which increased by 4.34%, and a slight increase in TPR by 1.06%. While the tendency to produce FPs by this model remained, the risk of incorrectly confirming unripe fruits upon a positive result decreased by 4.7%, and the chance of correctly excluding unripe fruits increased marginally by 1.5%. As a result, ACC, κ, and F05 increased by 2.7%, 5.4%, and 3.15, respectively. However, evaluation of this model on the test set turned out to be surprisingly worse, because TPR dropped to 57.55% and TNR achieved only 80.66%, leading to ACC of 69.1%, F05 of 70.6, and κ of 38.21%. Such a result suggests model overfitting despite parameter tuning during calibration.
In contrast, probability-based meta-classifiers did not exhibit such sensitivity to overfitting, maintaining consistent performance across calibration and test sets. The best G_pSVM_L model, which also utilized the D2 dataset, showed calibration performance similar to the baseline model, maintaining high accuracy in recognizing unripe fruits while showing a greater tendency to generate FNs simultaneously. The ACC, κ, and F05 values of 89.5%, 78.99%, and 88.17, respectively, were slightly lower, but the differences did not exceed 1%. Although TPR decreased by 2.7%, TNR improved by 2.35% to 86.27%, favorable for reducing FPs. Accordingly, the chance of correctly excluding class A fruit on a negative result declined to 91.6%, whereas the risk of incorrectly confirming class A fruit on a positive result decreased to 14.8%. Compared with G_sSVM_L, the G_pSVM_L classifier performed slightly worse in calibration, particularly in TPR, which decreased by 3.76%, but its prediction results revealed greater robustness. On the test set, the model achieved TPR of 95.28% and TNR of 90.57%, which translated into ACC of 92.92%, F05 of 91.82, and κ of 85.85%. These outcomes confirm a slightly lower imbalance between class recognition, although model precision at prediction reached only 90.99%, reflecting residual asymmetry in classification performance.
Unlike other models, the best G_pSVM_R model was developed on the SG dataset and yielded the best calibration results, with ACC = 93.19%, 3.52% higher than the baseline. Marked improvements were also observed in κ, F05, and PPV, which increased by 7.04%, 4.23, and 4.86%, respectively, driven mainly by enhanced recognition of class B fruit. TNR increased substantially by 5.87%, while TPR rose by 1.17%. As a result, the chance of correctly excluding class A fruit on a negative result reached 96.2%, and the risk of false confirmation of class A on a positive result dropped to 10.6%. Like G_pSVM_L, the G_pSVM_R model proved stable during prediction, with test set metrics exceeding calibration by an average of 3.75%. TNR increased by 4.08% compared to the calibration stage, while TPR was higher by 3.4%, reaching 100%. With LR+ of 16.31, the risk of incorrectly confirming class A fruit on a positive result was reduced to 6.1%.

3.2. Classification Results of ‘Weiki’ Kiwiberry

In contrast to the classifiers developed for ‘Geneva’ fruits, the ‘Weiki’ samples were modeled using data from two growing seasons. This suggests that they acquired a more universal character, as they accounted not only for individual fruit variability but also for inter-seasonal variation. Classification performance of the best models, at calibration and prediction stages, is shown in Table 4.
Models developed for ‘Weiki’ fruits achieved higher classification performance during calibration than those for ‘Geneva’ fruits. Nonetheless, their performance was lower during prediction, relative to their calibration results and the prediction outcomes for the G dataset. Furthermore, all classifiers achieved their best performance on D2-corrected data, except for the W_pSVM_R model, which is consistent with the observations for ‘Geneva’ fruit classification.
The baseline W_PLS-DA model showed a high TPR of 96.33% and a slightly lower TNR of 92.45%, with a relatively high model complexity as the optimal number of components was 18, two fewer than in G_PLS-DA. The lower specificity indicates a tendency to misclassify ripe fruits as unripe, reflected in a precision below 93% and ACC, κ, and F05 values of 94.39%, 88.79%, and 93.44, respectively. The chance of correctly excluding unripe fruits upon a negative result was 96%, while the risk of incorrectly confirming unripe fruits upon a positive result was 7.8%. Prediction performance of baseline model was slightly lower, with ACC, F05, and κ of 91.84%, 90.21, and 83.68%, respectively. This decrease resulted mainly from a higher incidence of FPs, reducing TNR to 88.16%, while TPR remained high at 95.53%. Consequently, precision dropped by 3.77%, and the risk of falsely confirming unripe fruits on positive classification rose to 12.4%, though the chance of correctly excluding unripe fruits from a negative result remained high at 94.9%.
The score-based model (W_sSVM_L) achieved calibration results nearly identical to those of the baseline model, differing most notably in TNR, though the gap did not exceed 0.5%. However, similar to the models developed for the G dataset, its classification performance deteriorated markedly at the prediction stage. ACC declined to only 68.68%, while TPR and TNR dropped by 30.15% and 21.33%, respectively. The loss of discriminative ability for both classes resulted in PPV and F05 decreasing to 69.83% and 68.98, respectively, while κ fell drastically by 51.48%. Model of such low quality, where LR+ and LR reached 2.31 and 0.48, respectively, entails as much as 43.2% risk of false confirmation for class A on positive result and only 52.2% chance of its correct exclusion on negative result.
During calibration, the performance metrics of the W_pSVM_L classifier closely matched those of both the baseline and W_sSVM_L models. Sensitivity stabilized at 95.61% and specificity of 93.04%, resulting in a PPV 0.1% higher than W_sSVM_L and 0.48% above the baseline. ACC, κ, and F05 reached 94.33%, 88.66%, and 93.69, indicating no meaningful improvement over the baseline model. Although the LR+ of 13.76 reflected a 0.5% reduction in the risk of falsely confirming unripe fruit upon a positive result, the LR of 0.05 implied a 0.8% lower probability of correctly excluding unripe fruits upon a negative result. At the prediction stage, the performance of W_pSVM_L declined slightly relative to calibration. Similarly to its counterpart trained on the G dataset, the main factor was a 4.1% drop in TNR, which reduced PPV by 3.6% and lowered ACC by 2.09%. The lower ability to recognize ripe fruit was reflected in κ = 84.47% and a decrease of F05 to 90.75. Consequently, with a 0.3% lower chance of correctly excluding unripe fruit upon a negative result, the risk of a false confirmation of fruit unripeness on a positive result increased by 4.3%, although it remained 0.8% lower than for the baseline model. Compared to the baseline model, the W_pSVM_L classifier generates FPs less frequently, but at the cost of increasing the number of FNs.
Within the same group of discriminative models, the W_pSVM_R classifier achieved slightly better performance than both the baseline and W_pSVM_L model during calibration. With a TPR of 96.99% and a TNR of 94.03%, it combined very high detection of unripe fruit with a good ability to avoid FPs. This balance translated into a PPV of 94.21% and ACC of 95.51%, outperforming W_pSVM_L by 1.46% and 1.11% in both measures. Agreement with the reference classes was also excellent, as reflected in κ = 91.02% and F05 = 94.75. Moreover, the highest LR+ value within this group indicates that the risk of incorrectly confirming unripe fruit upon a positive result was only 6.1%. At the same time, the lowest LR underscores a 96.8% chance of correctly excluding unripe fruit when the result is negative. On the prediction stage, the advantages of W_pSVM_R diminished but did not disappear. Sensitivity remained almost unchanged at 96.84%, yet specificity fell by about 5%, reducing precision to 89.76% and accuracy to 92.89%. The κ statistic dropped to 85.79% and F05 to 91.09, indicating a noticeable decline in the ability to limit FPs compared with calibration. The LR+ decreased to 8.76, nearly doubling the risk of incorrectly confirming unripe fruit upon a positive result to 11.4%, while the LR slightly increased, reducing the chance of correctly excluding unripe fruit from a negative result only by 0.3%. Despite decreases in some model capabilities, the classifier maintained TNR and PPV higher than W_pSVM_L in prediction and outperformed the baseline model in balancing sensitivity with FPs control.

3.3. Classification Results for the Combined Data of ‘Geneva’ and ‘Weiki’ Kiwiberry

After analyzing the results obtained separately for the ‘Weiki’ and ‘Geneva’ varieties, another step was to train classifiers on the combined dataset (WG). The pooled data were intended to capture seasonal and varietal variability, thereby allowing an assessment of model generalization capacity and searching for a more universal solution for postharvest fruit sorting. This approach makes it possible to verify whether integrating data from different cultivars enhances the stability and broad applicability of the developed algorithms. Results obtained for the best classifiers, at calibration and prediction stages, are shown in Table 5.
The best calibration results were obtained for models trained on D2-corrected data, which confirmed the trends observed for the individual datasets, except for G_pSVM_R. As for the G and W datasets, all WG models tended to generate FPs. For the WG_PLS-DA classifier, the difference between TPR and TNR at the calibration stage reached 5.77%. This imbalance resulted in a PPV of 88.11%, while ACC, κ, and F05 were 90.3%, 80.61% and 89.08, respectively. The chance of correctly excluding unripe fruit given a negative result was as high as 92.2%. However, simultaneously, the classifier carried a 13.5% risk of incorrectly confirming unripeness given a positive result. At the prediction stage, the performance of this classifier slightly declined. The main reason was its weaker ability to correctly identify ripe fruits, with specificity reduced to 84.97%, while sensitivity decreased marginally by 0.28%. This decline lowered the accuracy to 88.93% κ to 77.88%, and F05 to 87.36. As a consequence, the risk of misclassifying ripe fruit as unripe, having a positive result, rose to 16.2%, and the chance of correctly excluding ripe fruit with a negative result decreased to 91.7%.
Classification based on PLS components did not bring satisfactory results, even though at the calibration stage, the performance metrics of the WG_sSVM_L model were very close to those of WG_PLS-DA. Slightly higher TNR by 0.88% and TPR of 92.51% translated into a 91.5% chance of correctly excluding unripe fruit upon a negative result and a 12.6% risk of incorrectly confirming unripeness having a positive result. Accuracy and precision nearly overlapped with the baseline model, with ACC higher by 0.11%, κ by 0.21%, F05 by 0.42, and PPV by 0.67%. However, as observed for the models trained on G and W datasets separately, this classifier also proved unstable during prediction. The quality of results dropped sharply, with most metrics decreasing by about 30% and κ falling by more than 55%. Such a decline demonstrates the lack of robustness and indicates that the model suffered from overfitting.
Models based on probabilities proved considerably more stable, as reflected by only minor decreases in their metrics during prediction. Calibration results indicate that classifier WG_pSVM_L differed little from the WG_PLS-DA and WG_sSVM_L models. The most notable differences were observed in TPR, which was 1.01% lower, and TNR, which was 0.76% higher compared with the baseline. As for the remaining metrics, WG_pSVM_L showed no more than 0.55% deviations.
The RBF-kernel SVM classifier followed the same overall trend as the earlier pSVM_R models, although it used D1 spectra correction instead of D2. It delivered the best classification performance and showed strong stability, which was reflected in only minor differences between calibration and prediction metrics. Relative to the baseline model, WG_pSVM_R improved sensitivity and specificity by 2.82% and 3.2%, reaching 96.01% and 90.61% in calibration. This performance translated into a PPV of 91.1% and higher overall classification accuracy, with ACC of 93.31%, κ of 86.62%, and F05 of 92.04%. At this stage, the model lowered the risk of incorrectly confirming unripe fruit to 9.8% for positive outcomes, while raising the chance of correctly excluding unripe fruit after a negative result to 95.6%. In prediction, the model showed a decline in TNR to 88.18%, accompanied by a slight increase of 0.62% in TPR, reflecting a compromise between the opposite tendencies previously observed in the single-variety datasets. The model improved TPR and TNR with ‘Geneva’ fruits, whereas with ‘Weiki’ fruits, both metrics decreased, with TNR showing a powerful decline. In the combined dataset, these effects were partially balanced, resulting in a moderate increase in TPR and a slight reduction in TNR. This outcome illustrates the consequences of merging data representing different kiwiberry varieties. Integration enhances stability and generalization ability, but at the same time, it diminishes the positive effects observed for the better-recognized fruits and partly alleviates the adverse effects seen for the variety with more heterogeneous fruit traits, which are therefore harder to discriminate in terms of ripeness. As a result, in prediction on the WG dataset, the pSVM_R classifier showed a minimally increased chance of correctly excluding an unripe fruit with a negative result, which reached 96.2%, and a higher risk of misclassifying a ripe fruit as unripe upon a positive result, which rose to 12.2%. Nevertheless, WG_pSVM_R achieved the best performance within this group, reaching a PPV of 89.1%, an ACC of 92.4%, a κ of 84.8%, and an F05 of 90.15% in prediction.
For the combined WG dataset, the models performed better than those for ‘Geneva’ variety during calibration but lost this advantage in prediction, yielding lower metrics. Compared with models developed for ‘Weiki’ fruits, WG classifiers were weaker in both stages. Across classifiers trained on the WG dataset, sSVM_L models exhibited the lowest stability, whereas PLS-DA, pSVM_L, and pSVM_R maintained higher robustness. Among these, the sSVM_R model delivered the best overall performance.

3.4. Supplementary Analyses of Classifier Performance

To complement the reported classification metrics, we performed statistical validation of the models. McNemar’s test confirmed that differences between PLS-DA and pSVM_R were statistically significant for the G and WG datasets. In contrast, no significant difference was observed for ‘Weiki’, indicating comparable performance of both models in this case (Table A4, Appendix A). Narrow ranges of classifiers’ key metrics confirmed that pSVM_R achieved higher performance than PLS-DA, with narrower ranges for ACC, kappa, and PPV. In particular, ACC for Geneva increased to 0.95–0.98 compared to 0.89–0.94 for PLS-DA, while improvements were also evident for the combined dataset (0.91–0.94 vs. 0.87–0.91). In the case of ‘Weiki’, the differences were smaller but still consistent across metrics (Table A3, Appendix A). The superior classification performance of pSVM_R, together with the observed stability across bootstrap confidence intervals, motivates evaluation of model inference times to assess the practical feasibility of the proposed pipeline. Inference time measurements were performed separately for the PLS-DA and SVM stages because the models were generated using two independent, research-grade scripts, written for methodological purposes and not explicitly optimized for computational efficiency. Specifically, we recorded the time for the best PLS-DA models to generate probabilities for the test samples, which were subsequently used as input to the best SVM classifiers, and the time for the trained SVM models to classify the same samples. The measured inference times (below 0.2 ms per fruit) indicate that PLS-DA and PLS-DA + SVM models operate with high computational efficiency on a standard personal computer, and the additional complexity introduced by the SVM does not result in a notable computational burden (Table A5, Appendix A).

4. Discussion

Our experiment showed that the traditional use of PLS-DA gave pretty good results, but pSVM models performed better. A common challenge across classifiers was the imbalance between TPR and TNR. The extent of this imbalance, however, depended on the dataset. Classifiers developed independently for each variety revealed opposite tendencies. Models designed for ‘Geneva’ fruits reduced the initially wide gap between TPR and TNR observed in calibration and improved both metrics at the prediction stage. In the case of models developed for ‘Weiki’ fruits, the opposite tendency was observed. Here prediction led to a decline in both metrics, with the decrease being particularly pronounced for TNR and only marginal for TPR. Similarly, in the combined WG dataset, the gap was less pronounced during calibration but widened again at the prediction stage. Interestingly, the gap between calibration and prediction was greater in the variety-specific models than in the combined one, even for TNR, which showed the highest variability across scenarios.
Such pattern suggests that our models focus more on the correct recognition of the winning class during training, which leads to their sensitivity improvement, limiting the reliability in identifying ripe fruits simultaneously. More importantly, the differences between calibration and prediction were more pronounced in variety-specific models than in the combined dataset, underlining the lower stability of single-variety approaches.
The decline in TNR of examined models mirrors observations by Lee et al. [27], who reported that normalization methods can strongly influence specificity in kiwifruit classification. Furthermore, Yang et al. [62] and Li et al. [36] revealed that SVM classifiers outperformed PLS-DA models across different fruit species and varying sets of input traits, though exceptions exist. For a change, Bakhshipour [21] reported that a PLS-DA classifier combined with SGD1 spectral correction slightly outperformed the corresponding SVM model in discriminating Hayward kiwifruit by ripeness. Moreover, Benelli et al. [20] demonstrated that spectral pre-processing combined with variable selection substantially improved PLS-DA performance.
A further important aspect of this study was the evaluation of the combined WG dataset, which allowed assessment of classifier generalization under increased data variability and highlighted broader practical and methodological implications. In practical terms, this outcome highlights an essential methodological and technological challenge. Real sorting systems are unlikely to work with fruits of only one variety. Thus, the universality of a model becomes a valuable advantage. At the same time, there is a risk of compromise, since combining data may enhance overall generalization capacity, yet it can also reduce prediction accuracy for individual varieties, as the model must cope with a broader range of variability. From a methodological standpoint, this approach tests the model’s robustness, since high performance obtained on the combined dataset demonstrates that the selected spectral features are stable and highly discriminative. On the other hand, the practical consequences are twofold, because weaker performance may indicate that, in industrial settings, separate models for each variety could be more effective, or that adaptive systems capable of adjusting parameters to the specific fruit batch would offer a better solution. These outcomes are consistent with, yet not identical to, earlier studies. Sarkar et al. [41] noted that models dedicated to individual species of hardy kiwi characterized by better prediction accuracy than those trained on combined data. He highlighted the risk of reduced performance when variability between cultivars is not fully represented. On the other hand, Mishra [63] showed that global NIR models built on multi-fruit datasets may surpass variety-specific approaches, as long as the spectral profiles of the cultivars are sufficiently similar. Our results for the WG dataset reflect these tendencies, highlighting both the potential of shared models and the trade-offs inherent in balancing universality with cultivar-specific accuracy.
McNemar’s test indicated statistically significant differences between PLS-DA and pSVM_R classifiers for G and the combined WG dataset, while no significant difference was found for ‘Weiki’. This reflects the smaller size and the single-season scope of the Geneva dataset, which emphasized differences between models, and the more heterogeneous, two-season W dataset, where both classifiers achieved similarly high performance. Interestingly, despite the smaller proportion of ‘Geneva’ samples in the combined dataset, the differences remained significant, highlighting the greater robustness of the pSVM_R classifier in capturing cultivar-specific variability.
Another key finding of our study is the consistent weakness of sSVM_L classifiers, which suffered from severe prediction declines across ‘Geneva’, ‘Weiki’, and WG datasets. Such results point to model overfitting, despite its hyperparameter optimization. In contrast, pSVM_L and pSVM_R classifiers maintained higher overfitting robustness, with the latter ensuring the best trade-off between calibration and prediction performance. Its improvements in TNR and PPV substantially reduced the risk of false confirmations of fruit unripeness, lowering it to just over 6%. These results show that stacking models enriched with information on class probability may improve ripeness discrimination and reduce the overfitting observed in score-based SVM models. The consistent stability of pSVM_R across G, W and WG datasets highlights the potential of probability-driven approaches for robust, non-invasive fruit sorting. Probability-based SVM classifiers, particularly those with RBF kernels, provided the most reliable performance across examined kiwiberry varieties. Nevertheless, the observed drop in TNR for ‘Weiki’ and WG datasets suggests that further refinement may be needed, possibly through adaptive or hybrid approaches. At the same time, the comparative analysis of variety-specific and combined models indicates that generalization is achievable without large losses in accuracy, though this comes at the cost of slightly lower peak performance than the best single-variety models. Despite using separate, non-optimized implementations of PLS-DA and SVM models, measured per-sample inference times were very small (on the order of 0.07–0.16 ms), indicating that the approach is computationally efficient even without code-level optimization. The observed performance and low inference times on a standard personal computer suggest that real-time deployment is feasible, with expected hardware requirements limited to a mid-range CPU and 16 GB RAM. Therefore, code optimization, system integration, and validation under commercial-scale conditions remain subjects for future work.
Since hyperspectral imaging provides rich spatial and spectral information, industrial applications may benefit from point-wise measurements targeting only selected, non-contiguous wavelengths rather than the full VNIR or SWIR range. This represents another potential direction for future work, which does not exclude using meta-inspired models but would involve fewer input variables and could reduce system complexity and costs.

5. Conclusions

This study evaluated a meta-inspired classification framework integrating hyperspectral imaging with linear and nonlinear modeling strategies for postharvest sorting of kiwiberry, a fruit characterized by high perishability and uneven ripening. The comparative analysis of PLS-DA, score-based SVM (sSVM), and probability-based SVM (pSVM) models demonstrated apparent differences in their robustness and practical applicability. Variety-specific models achieved high calibration accuracy, yet their prediction stability varied, with sSVM models consistently showing overfitting. In contrast, probability-driven approaches, particularly RBF-based pSVMs, provided superior performance across datasets, achieving predictive accuracies above 92% and substantially reducing false classifications.
Combining data from different cultivars highlighted classification specificity and accuracy trade-offs for individual varieties, which suggests a potential for generalization. However, since only two cultivars were included, further studies involving a broader range of kiwiberry genotypes are needed to assess model robustness within the species adequately.
Beyond methodological insights, these outcomes have practical implications for kiwiberry production. Reliable discrimination between ripe and unripe fruits facilitates effective postharvest management, supporting procedures such as rapid cooling or modified atmosphere storage, which help extend shelf life and slow down postharvest ripening. Such approaches are crucial for expanding the market availability of kiwiberry and reducing postharvest losses, thereby improving fruit quality management in supply chains. Moreover, combining data from different cultivars demonstrated that generalization is possible without significant losses in accuracy, offering a promising pathway toward universal classification systems that can accommodate fruit variability encountered in real-world conditions.
Importantly, this study systematically evaluates PLS-DA, sSVM, and pSVM approaches and demonstrates the novelty of integrating probability- and score-based models derived from PLS-DA into SVM frameworks. This is the first application of such an integrated strategy to Actinidia arguta, offering insights that may be transferable to other highly perishable fruits. From an industrial perspective, the results support the development of automated, non-destructive sorting systems that could be incorporated into postharvest processing lines, improving consistency and efficiency in fruit quality management.
Nevertheless, limitations remain, as the study was restricted to two cultivars and laboratory conditions. The current models were implemented using research-grade, two-stage scripts that are not fully optimized for runtime. However, measured inference times on a standard personal computer, statistically validated performance, and confidence intervals indicate clear potential for real-time deployment. Future work should follow a two-pronged approach. First, one should validate the proposed models on a wider genetic pool. On the other side, future studies should focus on code optimization, system-level integration, and testing the models under operational conditions on pilot sorting lines to evaluate hardware requirements, integration challenges, and economic feasibility.

Author Contributions

Conceptualization, M.J.-M.; methodology, M.J.-M.; validation, M.J.-M. and D.R.M.; formal analysis, M.J.-M. and D.R.M.; investigation, M.J.-M.; resources, M.J.-M.; writing—original draft preparation, M.J.-M. and D.R.M.; writing—review and editing, M.J.-M. and D.R.M.; visualization, M.J.-M.; project administration, M.J.-M.; funding acquisition, M.J.-M. All authors have read and agreed to the published version of the manuscript.

Funding

The research was supported by the Agency for Restructuring and Modernization of Agriculture (ARMA) in Poland (00011.DDD.6509.00015.2019.07).

Data Availability Statement

Restrictions apply to the datasets. The datasets presented in this article are not readily available because the data are part of an ongoing study and due to technical limitations. Requests to access the datasets should be directed to Monika Janaszek-Mańkowska (monika_janaszek@sggw.edu.pl).

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Table A1. Calibration and prediction results for PLS-DA and SVM classifiers.
Table A1. Calibration and prediction results for PLS-DA and SVM classifiers.
CultivarCorrectionModelClassification Performance Metrics
ACCκF05PPVTPRTNRLR+LRnCCγ
Calibration (10-fold cross-validation)
GD1PLS-DA0.88030.76060.86330.84910.92490.83575.62860.089920
GD2PLS-DA0.89670.79340.87380.85580.95420.83925.93430.054520
GMCPLS-DA0.87850.75700.86140.84710.92370.83335.54230.091520
GMSCPLS-DA0.88030.76060.86290.84840.92610.83455.59570.088620
GSGPLS-DA0.87970.75940.86090.84530.92960.82985.46210.084917
GSNVPLS-DA0.88380.76760.86530.85010.93190.83575.67140.081520
WD1PLS-DA0.94330.88660.93030.92100.96990.916711.65350.032920
WD2PLS-DA0.94390.88790.93440.92740.96330.924512.78260.039718
WMCPLS-DA0.93970.87930.92920.92150.96130.918011.73600.042219
WMSCPLS-DA0.94130.88260.93030.92230.96400.918611.86290.039319
WSGPLS-DA0.94000.88000.92900.92100.96260.917311.65870.040819
WSNVPLS-DA0.94130.88260.92940.92070.96590.916711.60630.037219
WGD1PLS-DA0.89730.79470.88510.87530.92680.86787.01910.084420
WGD2PLS-DA0.90300.80610.89080.88110.93190.87427.41140.078020
WGMCPLS-DA0.88830.77660.87970.87250.90960.86706.84490.104420
WGMSCPLS-DA0.90010.80020.88770.87770.92980.87047.17860.080820
WGSGPLS-DA0.89020.78040.88180.87480.91080.86956.98710.102620
WGSNVPLS-DA0.89860.79720.88580.87560.92940.86787.03820.081520
GD1sSVM_L0.88380.76760.87400.86580.90850.85926.45000.1066195
GD2sSVM_L0.92370.84740.90530.89150.96480.88268.22000.0399209
GMCsSVM_L0.88910.77820.87660.86630.92020.85806.47930.0930207
GMSCsSVM_L0.89200.78400.87960.86950.92250.86156.66100.0899203
GSGsSVM_L0.88670.77350.87300.86170.92140.85216.23020.0923201
GSNVsSVM_L0.89320.78640.88030.86980.92490.86156.67800.0872208
WD1sSVM_L0.94430.88850.93770.93300.95740.931113.91430.0458201
WD2sSVM_L0.94430.88850.93680.93130.95940.929113.55560.0438184
WMCsSVM_L0.94390.88790.93760.93290.95670.931113.90480.0465202
WMSCsSVM_L0.94300.88590.93450.92840.96000.925912.96460.0432201
WSGsSVM_L0.94330.88660.93690.93230.95610.930413.76420.04722010
WSNVsSVM_L0.94360.88720.93490.92850.96130.925912.98230.0418201
WGD1sSVM_L0.90090.80180.89350.88750.91820.88367.89160.0926182.5
WGD2sSVM_L0.90410.80820.89500.88780.92510.88307.91370.0848198
WGMCsSVM_L0.89270.78540.88560.87970.91000.87547.31080.1029203
WGMSCsSVM_L0.90000.79990.89260.88660.91730.88267.82070.09382010
WGSGsSVM_L0.89080.78170.88400.87830.90750.87427.21740.1059202
WGSNVsSVM_L0.89880.79760.89290.88810.91260.88507.93900.0988208
GD1sSVM_R0.98180.96360.98280.98350.98000.983659.64290.02031820.3
GD2sSVM_R0.97770.95540.97640.97550.98000.975439.76190.02051920.2
GMCsSVM_R0.98420.96830.98180.98020.98830.980049.52940.01202020.2
GMSCsSVM_R0.97180.94370.97380.97520.96830.975439.28570.03251620.4
GSGsSVM_R0.98360.96710.98160.98020.98710.980049.47060.01322020.2
GSNVsSVM_R0.97360.94720.97330.97300.97420.973036.08700.02651820.3
WD1sSVM_R0.96430.92850.96230.96100.96790.960624.61670.03352060.2
WD2sSVM_R0.95700.91410.96360.96840.94500.969230.68090.05692030.4
WMCsSVM_R0.92520.85050.96360.99540.85450.9961217.33330.14622020.9
WMSCsSVM_R0.95870.91740.96400.96790.94890.968530.16670.05281830.6
WSGsSVM_R0.95410.90820.96780.97790.92920.979044.31250.07242020.5
WSNVsSVM_R0.95970.91930.96130.96240.95670.962625.61400.04502020.3
WGD1sSVM_R0.96360.92720.96080.95880.96890.958323.27270.03252040.2
WGD2sSVM_R0.95310.90620.95750.96070.94490.961324.42390.05741960.4
WGMCsSVM_R0.96260.92510.96530.96730.95750.967629.57140.04392040.3
WGMSCsSVM_R0.95750.91500.96070.96300.95160.963426.01150.05021740.4
WGSGsSVM_R0.96090.92180.96390.96600.95540.966328.40000.04622030.3
WGSNVsSVM_R0.95750.91500.95840.95910.95580.959223.43300.04611830.3
GD1pSVM_L0.87680.75350.86460.85430.90850.84515.86360.1083 1
GD2pSVM_L0.89500.78990.88170.87100.92720.86276.75210.0844 1
GMCpSVM_L0.87620.75230.86600.85730.90260.84986.00780.1146 1
GMSCpSVM_L0.88090.76170.86870.85860.91200.84986.07030.1036 1
GSGpSVM_L0.87970.75940.86630.85510.91430.84515.90150.1014 1
GSNVpSVM_L0.88260.76530.86890.85750.91780.84746.01540.0970 1
WD1pSVM_L0.94330.88660.93500.92900.96000.926513.08040.0432 1
WD2pSVM_L0.94330.88660.93690.93230.95610.930413.76420.0472 1
WMCpSVM_L0.94030.88070.93450.93020.95220.928513.33030.0516 1
WMSCpSVM_L0.94200.88390.93310.92660.96000.923912.62930.0433 1
WSGpSVM_L0.94300.88590.93490.92890.95940.926513.07140.0439 1
WSNVpSVM_L0.94200.88390.93410.92830.95810.925912.93810.0454 1
WGD1pSVM_L0.89690.79390.88930.88310.91510.87887.55560.0967 1
WGD2pSVM_L0.90180.80350.89320.88640.92180.88177.80070.0888 1
WGMCpSVM_L0.88490.76990.87930.87440.89910.87086.96420.1160 1
WGMSCpSVM_L0.89610.79220.88940.88390.91210.88017.61050.1000 1
WGSGpSVM_L0.88700.77410.88150.87680.90080.87337.11630.1137 1
WGSNVpSVM_L0.89310.78630.88790.88350.90580.88057.58450.1071 1
GD1pSVM_R0.91080.82160.88940.87310.96130.86036.88240.0450 160.1792
GD2pSVM_R0.91550.83100.89380.87740.96600.86507.15650.0393 320.2686
GMCpSVM_R0.92840.85680.91320.90200.96130.89559.20220.0433 160.1161
GMSCpSVM_R0.92430.84860.90310.88750.97180.87687.88570.0321 1280.1906
GSGpSVM_R0.93190.86380.91610.90440.96600.89799.45980.0379 320.1098
GSNVpSVM_R0.91900.83800.89660.87980.97070.86747.31860.0338 1280.2085
WD1pSVM_R0.94920.89840.94010.93360.96720.931114.05710.0352 640.2233
WD2pSVM_R0.95510.91020.94750.94210.96990.940316.26370.0321 160.2019
WMCpSVM_R0.95210.90430.94250.93560.97120.933114.52940.0309 320.1887
WMSCpSVM_R0.95480.90950.94670.94090.97050.939015.92470.0314 320.2799
WSGpSVM_R0.94620.89250.93650.92940.96590.926513.16070.0368 160.1930
WSNVpSVM_R0.95080.90160.94190.93540.96850.933114.49020.0338 640.1908
WGD1pSVM_R0.93310.86620.92040.91100.96010.906110.23770.0441 640.1479
WGD2pSVM_R0.92530.85060.90760.89430.96470.88598.46490.0399 1280.1632
WGMCpSVM_R0.93160.86330.91760.90720.96170.90159.77350.0425 1280.1282
WGMSCpSVM_R0.92790.85570.91490.90520.95580.89989.55040.0491 320.1320
WGSGpSVM_R0.93160.86330.91610.90460.96510.89819.48350.0389 640.1261
WGSNVpSVM_R0.92830.85650.91400.90340.95920.89739.34840.0455 320.1256
Prediction
GD1PLS-DA0.89620.79250.87900.86520.93870.85386.41940.071820
GD2PLS-DA0.92220.84430.89840.88090.97640.86797.39290.027220
GMCPLS-DA0.88920.77830.87150.85710.93400.84436.00000.078220
GMSCPLS-DA0.89390.78770.85630.82750.99530.79254.79550.006020
GSGPLS-DA0.89860.79720.87670.85960.95280.84436.12120.055917
GSNVPLS-DA0.91270.82550.89730.88550.94810.87747.73080.059120
WD1PLS-DA0.92240.84470.90310.88860.96580.87897.97830.038920
WD2PLS-DA0.91840.83680.90210.88970.95530.88168.06670.050718
WMCPLS-DA0.90790.81580.89430.88370.93950.87637.59570.069119
WMSCPLS-DA0.74340.48680.81380.95570.51050.976321.55560.501319
WSGPLS-DA0.90660.81320.89250.88150.93950.87377.43750.069319
WSNVPLS-DA0.91840.83680.90210.88970.95530.88168.06670.050719
WGD1PLS-DA0.88510.77030.86810.85400.92910.84125.85110.084320
WGD2PLS-DA0.88940.77870.87360.86070.92910.84976.17980.083520
WGMCPLS-DA0.87750.75510.86680.85760.90540.84976.02250.111320
WGMSCPLS-DA0.68160.36320.73320.94980.38340.979718.91670.629320
WGSGPLS-DA0.87920.75840.86770.85810.90880.84976.04490.107420
WGSNVPLS-DA0.89360.78720.87590.86180.93750.84976.23600.073620
GD1sSVM_L0.67690.35380.68180.69840.62260.73112.31580.5161195
GD2sSVM_L0.69100.38210.70600.74850.57550.80662.97560.5263209
GMCsSVM_L0.52590.05190.51380.53010.45750.59431.12790.9127207
GMSCsSVM_L0.64390.28770.64160.62250.73110.55661.64890.4831203
GSGsSVM_L0.52590.05190.51560.52940.46700.58491.12500.9113201
GSNVsSVM_L0.64620.29250.64810.66320.59430.69811.96880.5811208
WD1sSVM_L0.73950.47890.74040.74200.73420.74472.87630.3569201
WD2sSVM_L0.68680.37370.68980.69830.65790.71582.31480.4779184
WMCsSVM_L0.57760.15530.57140.59080.50530.65001.44360.7611202
WMSCsSVM_L0.72240.44470.73460.75840.65260.79213.13920.4385201
WSGsSVM_L0.57630.15260.57210.58480.52630.62631.40850.75632010
WSNVsSVM_L0.65530.31050.65760.67050.61050.70002.03510.5564201
WGD1sSVM_L0.60050.20100.60040.60100.59800.60301.50640.6667182.5
WGD2sSVM_L0.62160.24320.62150.62540.60640.63681.66980.6180198
WGMCsSVM_L0.58530.17060.57990.60040.51010.66051.50250.7417203
WGMSCsSVM_L0.55240.10470.53660.56740.44090.66391.31160.84222010
WGSGsSVM_L0.58700.17400.58330.59770.53210.64191.48580.7289202
WGSNVsSVM_L0.56760.13510.56270.57490.51860.61661.35240.7808208
GD1sSVM_R0.51650.03300.14581.00000.03301.000070,000.000.96701820.3
GD2sSVM_R0.52590.05190.21481.00000.05191.0000110,000.00.94811920.2
GMCsSVM_R0.50710.01420.08620.80000.01890.99534.00000.98582020.2
GMSCsSVM_R0.52590.05190.25000.82350.06600.98584.66670.94741620.4
GSGsSVM_R0.50710.01420.08620.80000.01890.99534.00000.98582020.2
GSNVsSVM_R0.53070.06130.26790.88240.07080.99067.50000.93811820.3
WD1sSVM_R0.57500.15000.47080.98310.15260.997458.00000.84962060.2
WD2sSVM_R0.54740.09470.34770.97370.09740.997437.00000.90502030.4
WMCsSVM_R0.50260.00530.02581.00000.00531.000020,000.000.99472020.9
WMSCsSVM_R0.50000.0000 0.00001.00000.00001.00001830.6
WSGsSVM_R0.50920.01840.09620.88890.02110.99748.00000.98152020.5
WSNVsSVM_R0.50130.00260.01301.00000.00261.000010,000.000.99742020.3
WGD1sSVM_R0.55410.10810.38850.93240.11660.991613.80000.89102040.2
WGD2sSVM_R0.51270.02530.12120.94120.02700.998316.00000.97461960.4
WGMCsSVM_R0.50930.01860.08651.00000.01861.0000110,000.00.98142040.3
WGMSCsSVM_R0.50080.00170.00841.00000.00171.000010,000.000.99831740.4
WGSGsSVM_R0.50930.01860.08651.00000.01861.0000110,000.00.98142030.3
WGSNVsSVM_R0.50250.00510.04030.71430.00840.99662.50000.99491830.3
GD1pSVM_L0.90330.80660.89220.88340.92920.87747.57690.0806 1
GD2pSVM_L0.92920.85850.91820.90990.95280.905710.10000.0521 1
GMCpSVM_L0.88440.76890.86880.85590.92450.84435.93940.0894 1
GMSCpSVM_L0.89620.79250.85910.83070.99530.79724.90700.0059 1
GSGpSVM_L0.89390.78770.87590.86150.93870.84916.21880.0722 1
GSNVpSVM_L0.90800.81600.89480.88440.93870.87747.65380.0699 1
WD1pSVM_L0.92240.84470.90750.89630.95530.88958.64290.0503 1
WD2pSVM_L0.92240.84470.90750.89630.95530.88958.64290.0503 1
WMCpSVM_L0.91580.83160.90860.90310.93160.90009.31580.0760 1
WMSCpSVM_L0.64610.29210.67220.97440.30000.992138.00000.7056 1
WSGpSVM_L0.91580.83160.90750.90100.93420.89749.10260.0733 1
WSNVpSVM_L0.92110.84210.90790.89800.95000.89218.80490.0560 1
WGD1pSVM_L0.88010.76010.86890.85940.90880.85146.11360.1071 1
WGD2pSVM_L0.89950.79900.88640.87600.93070.86827.06410.0798 1
WGMCpSVM_L0.87420.74830.86600.85900.89530.85306.09200.1228 1
WGMSCpSVM_L0.67480.34970.72230.94810.36990.979718.25000.6431 1
WGSGpSVM_L0.88010.76010.86820.85830.91050.84976.05620.1054 1
WGSNVpSVM_L0.89530.79050.88140.87030.92910.86156.70730.0824 1
GD1pSVM_R0.93870.87740.91870.90430.98110.89629.45450.0211 160.1792
GD2pSVM_R0.94810.89620.93190.92040.98110.915111.55560.0206 320.2686
GMCpSVM_R0.95990.91980.94200.92950.99530.924513.18750.0051 160.1161
GMSCpSVM_R0.88440.76890.86710.85280.92920.83965.79410.0843 1280.1906
GSGpSVM_R0.96930.93870.95320.94221.00000.938716.30770.0000 320.1098
GSNVpSVM_R0.92220.84430.89840.88090.97640.86797.39290.0272 1280.2085
WD1pSVM_R0.94340.88680.92270.90800.98680.90009.86840.0146 640.2233
WD2pSVM_R0.92890.85790.91090.89760.96840.88958.76190.0355 320.2799
WMCpSVM_R0.94470.88950.92570.91220.98420.905310.38890.0174 320.1887
WMSCpSVM_R0.76050.52110.82810.94590.55260.968417.50000.4620 160.2019
WSGpSVM_R0.94470.88950.92690.91420.98160.907910.65710.0203 160.1930
WSNVpSVM_R0.94470.88950.92570.91220.98420.905310.38890.0174 640.1908
WGD1pSVM_R0.92400.84800.90510.89100.96620.88188.17140.0383 640.1479
WGD2pSVM_R0.91130.82260.88690.86840.96960.85306.59770.0356 1280.1632
WGMCpSVM_R0.93160.86320.91330.89980.97130.89198.98440.0322 1280.1282
WGMSCpSVM_R0.71540.43070.78240.96030.44930.981424.18180.5611 320.1320
WGSGpSVM_R0.93500.86990.91720.90420.97300.89709.44260.0301 640.1261
WGSNVpSVM_R0.91640.83280.89760.88340.95950.87337.57330.0464 320.1256
Abbreviations: Cultivar: W–Weiki, G–Geneva, WG–Weiki + Geneva; Correction: MSC-Multiplicative Scatter Correction, SNV-Standard Normal Variate, SG-Savitzky–Golay smoothing, MC-mean centering, D1–the first derivative, D2–the second derivative; Model: PLS-DA–partial least square discriminant analysis, SVM–support vector machine, pSVM_L–probability-based SVM with linear kernel, pSVM_R-probability-based SVM with RBF kernel, sSVM_L score-based SVM with linear kernel; Classification performance metrics: ACC–accuracy, κ–Cohen’s kappa, F05–F0.5-score, PPV–precision, TPR–true positive rate (sensitivity, recall), TNR–true negative rate, LR+ –positive likelihood ratio, LR –negative likelihood ratio, nC–number of PLS components, C–SVM penalty parameter, γ–SVM RBF kernel coefficient.
Table A2. Confusion matrices and AUCs for the best models.
Table A2. Confusion matrices and AUCs for the best models.
ModelTPFNFPTNAUC
Calibration
G_PLS-DA (D2)813391377150.949
G_sSVM_L (D2)822301007520.960
G_pSVM_L (D2)790621177350.946
G_pSVM_R (SG)82329877650.973
W_PLS-DA (D2)14705611514090.979
W_sSVM_L (D2)14646210814160.982
W_pSVM_L (D2)14596710614180.979
W_pSVM_R (D2)1481459314310.978
WG_PLS-DA (D2)221616229920770.952
WG_sSVM_L (D2)220017827820980.954
WG_pSVM_L (D2)219218628120950.952
WG_pSVM_R (D1)22839522321530.971
Prediction
G_PLS-DA (D2)2075281840.97
G_sSVM_L (D2)12290411710.781
G_pSVM_L (D2)20210201920.970
G_pSVM_R (SG)2120131990.991
W_PLS-DA (D2)36317453350.965
W_sSVM_L (D2)2501301082720.736
W_pSVM_L (D2)36317423380.967
W_pSVM_R (D2)36812423380.959
WG_PLS-DA (D2)55042895030.941
WG_sSVM_L (D2)3592332153770.656
WG_pSVM_L (D2)55141785140.942
WG_pSVM_R (D1)57220705220.969
Abbreviations: TP–true-positive, FN–false-negative, FP–false-positive, TN–true-negative, AUC–area under ROC curve; Cultivar: W–Weiki, G–Geneva, WG–Weiki + Geneva; Correction: SG-Savitzky–Golay smoothing, D1–the first derivative, D2–the second derivative; Model: PLS-DA–partial least square discriminant analysis, SVM–support vector machine, pSVM_L–probability-based SVM with linear kernel, pSVM_R-probability-based SVM with RBF kernel, sSVM_L score-based SVM with linear kernel.
Figure A1. Receiver Operating Characteristic (ROC) curves for the best-performing models: (a) G_PLS-DA (D2) model; (b) G_pSVM_L (D2) model; (c) G_pSVM_R (SG) model; (d) G_sSVM_L (D2) model; (e) W_PLS-DA (D2) model; (f) W_pSVM_L (D2) model; (g) W_pSVM_R (D2) model; (h) W_sSVM_L (D2) model; (i) WG_PLS-DA (D2) model; (j) WG_pSVM_L (D2) model; (k) WG_pSVM_R (D1) model; (l) WG_sSVM_L (D2) model.
Figure A1. Receiver Operating Characteristic (ROC) curves for the best-performing models: (a) G_PLS-DA (D2) model; (b) G_pSVM_L (D2) model; (c) G_pSVM_R (SG) model; (d) G_sSVM_L (D2) model; (e) W_PLS-DA (D2) model; (f) W_pSVM_L (D2) model; (g) W_pSVM_R (D2) model; (h) W_sSVM_L (D2) model; (i) WG_PLS-DA (D2) model; (j) WG_pSVM_L (D2) model; (k) WG_pSVM_R (D1) model; (l) WG_sSVM_L (D2) model.
Processes 13 03446 g0a1aProcesses 13 03446 g0a1b
Figure A2. Spectral SG-corrected data averaged across 2° Brix intervals. (a) VNIR ‘Geneva’; (b) VNIR ‘Weiki’; (c) SWIR ‘Geneva’; (d) SWIR ‘Weiki’.
Figure A2. Spectral SG-corrected data averaged across 2° Brix intervals. (a) VNIR ‘Geneva’; (b) VNIR ‘Weiki’; (c) SWIR ‘Geneva’; (d) SWIR ‘Weiki’.
Processes 13 03446 g0a2
Table A3. Confidence intervals (1) of classification performance metrics for the best models.
Table A3. Confidence intervals (1) of classification performance metrics for the best models.
ModelConfidence IntervalClassification Performance Metrics
ACCκF05PPVTPR *TNR
G_PLS-DA (D2)Lower limit0.89390.78860.86000.83540.94660.8169
Upper limit0.94340.89020.92780.91630.99120.9072
W_PLS-DA (D2)Lower limit0.89610.79510.87430.85640.93030.8443
Upper limit0.93420.87060.92490.91630.97250.9093
WG_PLS-DA (D2)Lower limit0.86950.74010.84790.82970.90580.8174
Upper limit0.90540.81120.89430.88430.94900.8775
G_pSVM_R (SG)Lower limit0.94810.90030.92300.9056NA0.8994
Upper limit0.98110.96680.97340.9669NA0.9647
W_pSVM_R (D2)Lower limit0.90920.82260.88520.86550.94670.8557
Upper limit0.94470.89370.93310.92430.98300.9175
WG_pSVM_R (D1)Lower limit0.90710.81620.88350.86500.94950.8550
Upper limit0.93750.87670.92390.91370.97860.9060
(1) To estimate confidence intervals for classification metrics, we applied the bootstrap bias-corrected and accelerated (BCa) method using the boot package of R version 4.5.1 [64]. BCa accounts for both bias and skewness in the resampling distribution, providing more reliable interval estimates than the simple percentile approach. Abbreviations: Cultivar: W–Weiki, G–Geneva, WG–Weiki + Geneva; Correction: SG-Savitzky–Golay smoothing, D1–the first derivative, D2–the second derivative; Model: PLS-DA–partial least square discriminant analysis, SVM–support vector machine, pSVM_R–probability-based SVM with RBF kernel; Classification performance metrics: ACC–accuracy, κ– Cohen’s kappa, F05–F0.5-score, PPV–precision, TPR–true positive rate (sensitivity, recall), TNR–true negative rate; * NA: confidence interval not available (no false negatives observed in the test set).
Table A4. McNemar’s test (1) results.
Table A4. McNemar’s test (1) results.
Comparable ModelsTest Statistics
Chi-Squarep-Value
G_PLS-DA (D2) vs. G_pSVM_R (SG)12.03330.00052
W_PLS-DA (D2) vs. W_pSVM_R (D2)1.88460.16981
WG_PLS-DA (D2) vs. WG_pSVM_R (D1)20.25320.00001
(1) McNemar’s tests were computed using mcnemar.test function available in the stats library of R version 4.5.1 [51]. Abbreviations: Cultivar: W–Weiki, G–Geneva, WG–Weiki + Geneva; Correction: SG-Savitzky–Golay smoothing, D1–the first derivative, D2–the second derivative; Model: PLS-DA–partial least square discriminant analysis, SVM–support vector machine, pSVM_R-probability-based SVM with RBF kernel.
Table A5. Prediction times (1) of PLS-DA and PLS-DA–pSVM_R meta-models.
Table A5. Prediction times (1) of PLS-DA and PLS-DA–pSVM_R meta-models.
ModelMedian [s]Median per 1 Obs. [s]nsamneval
Level-0Level-1Level-0Level-1
G_PLS-DA (D2)0.0701149 0.0001654 424100
G_pSVM_R (SG)0.06826710.03118980.00016100.0000736424100
W_PLS-DA (D2)0.0857587 0.0001128 760100
W_pSVM_R (D2)0.08575870.05542280.00011280.0000729760100
WG_PLS-DA (D2)0.1127689 0.0000952 1184100
WG_pSVM_R (D1)0.11135160.11509360.00009400.00009721184100
(1) Inference time measurements were performed with the microbenchmark package (100 repetitions) using R version 4.5.1 [65]. Times for the PLS-DA and SVM stages were measured separately, because the evaluation was executed with two independent scripts (research-grade, not specifically optimized for runtime). Median times are reported for each stage (level-0, level-1) and per sample. Hardware: Lenovo, Morrisville, NC, USA, Intel i5-10400F CPU 2.90 GHz, 16 GB RAM, no GPU. Abbreviations: nsam–number of samples in test dataset; newal–number of repetitions; Cultivar: W–Weiki, G–Geneva, WG–Weiki + Geneva; Correction: SG-Savitzky–Golay smoothing, D1–the first derivative, D2–the second derivative; Model: PLS-DA–partial least square discriminant analysis, SVM–support vector machine, pSVM_R-probability-based SVM with RBF kernel.

References

  1. Nishiyama, I.; Yamashita, Y.; Yamanaka, M.; Shimohashi, A.; Fukuda, T.; Oota, T. Varietal Difference in Vitamin C Content in the Fruit of Kiwifruit and Other Actinidia Species. J. Agric. Food Chem. 2004, 52, 5472–5475. [Google Scholar] [CrossRef]
  2. Latocha, P.; Łata, B.; Stasiak, A. Phenolics, Ascorbate and the Antioxidant Potential of Kiwiberry vs. Common Kiwifruit: The Effect of Cultivar and Tissue Type. J. Funct. Foods 2015, 19, 155–163. [Google Scholar] [CrossRef]
  3. Latocha, P.; Debersaques, F.; Decorte, J. Varietal differences in the mineral composition of kiwiberry-Actinidia arguta (Siebold et Zucc.) Planch. Ex. Miq. In Proceedings of the Acta Horticulturae (ISHS), VIII International Symposium on Kiwifruit, Chengdu, China, 21 September 2015; pp. 479–486. [Google Scholar]
  4. Latocha, P. The Nutritional and Health Benefits of Kiwiberry (Actinidia Arguta)—A Review. Plant Foods Hum. Nutr. Dordr. Neth. 2017, 72, 325–334. [Google Scholar] [CrossRef]
  5. Wojdyło, A.; Nowicka, P. Anticholinergic Effects of Actinidia arguta Fruits and Their Polyphenol Content Determined by Liquid Chromatography-Photodiode Array Detector-Quadrupole/Time of Flight-Mass Spectrometry (LC-MS-PDA-Q/TOF). Food Chem. 2019, 271, 216–223. [Google Scholar] [CrossRef]
  6. Pinto, D.; Delerue-Matos, C.; Rodrigues, F. Bioactivity, Phytochemical Profile and pro-Healthy Properties of Actinidia arguta: A Review. Food Res. Int. Ott. Ont. 2020, 136, 109449. [Google Scholar] [CrossRef]
  7. Latocha, P. Some Morphological and Biological Features of ‘Bingo’–A New Hardy Kiwifruit Cultivar from Warsaw University of Life Sciences (WULS) in Poland. Rocz. Pol. Tow. Dendrol 2012, 60, 61–67. [Google Scholar]
  8. Latocha, P.; Krupa, T.; Jankowski, P.; Radzanowska, J. Changes in Postharvest Physicochemical and Sensory Characteristics of Hardy Kiwifruit (Actinidia arguta and Its Hybrid) after Cold Storage under Normal versus Controlled Atmosphere. Postharvest Biol. Technol. 2014, 88, 21–33. [Google Scholar] [CrossRef]
  9. Stefaniak, J.; Przybył, J.L.; Latocha, P.; Łata, B. Bioactive Compounds, Total Antioxidant Capacity and Yield of Kiwiberry Fruit under Different Nitrogen Regimes in Field Conditions. J. Sci. Food Agric. 2020, 100, 3832–3840. [Google Scholar] [CrossRef] [PubMed]
  10. Fisk, C.L.; Silver, A.M.; Strik, B.C.; Zhao, Y. Postharvest Quality of Hardy Kiwifruit (Actinidia arguta ‘Ananasnaya’) Associated with Packaging and Storage Conditions. Postharvest Biol. Technol. 2008, 47, 338–345. [Google Scholar] [CrossRef]
  11. Boyes, S.; Strübi, P.; Marsh, H. Sugar and Organic Acid Analysis of Actinidia arguta and Rootstock–Scion Combinations of Actinidia Arguta. LWT-Food Sci. Technol. 1997, 30, 390–397. [Google Scholar] [CrossRef]
  12. Nishiyama, I.; Fukuda, T.; Shimohashi, A.; Oota, T. Sugar and Organic Acid Composition in the Fruit Juice of Different Actinidia Varieties. Food Sci. Technol. Res. 2008, 14, 67–73. [Google Scholar] [CrossRef]
  13. Wojdyło, A.; Nowicka, P.; Oszmiański, J.; Golis, T. Phytochemical Compounds and Biological Effects of Actinidia Fruits. J. Funct. Foods 2017, 30, 194–202. [Google Scholar] [CrossRef]
  14. Lü, Q.; Tang, M. Detection of Hidden Bruise on Kiwi Fruit Using Hyperspectral Imaging and Parallelepiped Classification. Procedia Environ. Sci. 2012, 12, 1172–1179. [Google Scholar] [CrossRef]
  15. Ebrahimi, S.; Pourdarbani, R.; Sabzi, S.; Rohban, M.H.; Arribas, J.I. From Harvest to Market: Non-Destructive Bruise Detection in Kiwifruit Using Convolutional Neural Networks and Hyperspectral Imaging. Horticulturae 2023, 9, 936. [Google Scholar] [CrossRef]
  16. Haghbin, N.; Bakhshipour, A.; Zareiforoush, H.; Mousanejad, S. Non-Destructive Pre-Symptomatic Detection of Gray Mold Infection in Kiwifruit Using Hyperspectral Data and Chemometrics. Plant Methods 2023, 19, 53. [Google Scholar] [CrossRef] [PubMed]
  17. Chen, X.; Zheng, L.; Kang, Z. Study on Test Method of Kiwifruit Hardness Based on Hyperspectral Technique. J. Phys. Conf. Ser. 2020, 1453, 012143. [Google Scholar] [CrossRef]
  18. Li, J.; Huang, B.; Wu, C.; Sun, Z.; Xue, L.; Liu, M.; Chen, J. Nondestructive Detection of Kiwifruit Textural Characteristic Based on near Infrared Hyperspectral Imaging Technology. Int. J. Food Prop. 2022, 25, 1697–1713. [Google Scholar] [CrossRef]
  19. Zhu, H.; Chu, B.; Fan, Y.; Tao, X.; Yin, W.; He, Y. Hyperspectral Imaging for Predicting the Internal Quality of Kiwifruits Based on Variable Selection Algorithms and Chemometric Models. Sci. Rep. 2017, 7, 7845. [Google Scholar] [CrossRef] [PubMed]
  20. Benelli, A.; Cevoli, C.; Fabbri, A.; Ragni, L. Ripeness Evaluation of Kiwifruit by Hyperspectral Imaging. Biosyst. Eng. 2022, 223, 42–52. [Google Scholar] [CrossRef]
  21. Bakhshipour, A. A Data Fusion Approach for Nondestructive Tracking of the Ripening Process and Quality Attributes of Green Hayward Kiwifruit Using Artificial Olfaction and Proximal Hyperspectral Imaging Techniques. Food Sci. Nutr. 2023, 11, 6116–6132. [Google Scholar] [CrossRef]
  22. Qin, L.; Zhang, J.; Stevan, S.; Xing, S.; Zhang, X. Intelligent Flexible Manipulator System Based on Flexible Tactile Sensing (IFMSFTS) for Kiwifruit Ripeness Classification. J. Sci. Food Agric. 2024, 104, 273–285. [Google Scholar] [CrossRef] [PubMed]
  23. Lee, S.; Sarkar, S.; Park, Y.; Yang, J.; Kweon, G. Feasibility Study for an Optical Sensing System for Hardy Kiwi (Actinidia arguta) Sugar Content Estimation. J. Agric. Life Sci. 2019, 53, 147–157. [Google Scholar] [CrossRef]
  24. Xu, L.; Chen, Y.; Wang, X.; Chen, H.; Tang, Z.; Shi, X.; Chen, X.; Wang, Y.; Kang, Z.; Zou, Z.; et al. Non-Destructive Detection of Kiwifruit Soluble Solid Content Based on Hyperspectral and Fluorescence Spectral Imaging. Front. Plant Sci. 2023, 13, 1075929. [Google Scholar] [CrossRef]
  25. Mansourialam, A.; Rasekh, M.; Ardabili, S.; Dadkhah, M.; Mosavi, A. Hyperspectral Method Integrated with Machine Learning to Predict the Acidity and Soluble Solid Content Values of Kiwi Fruit During the Storage Period. Acta Technol. Agric. 2024, 27, 187–193. [Google Scholar] [CrossRef]
  26. Mumford, A.; Abrahamsson, Z.; Hale, I. Predicting Soluble Solids Concentration of ‘Geneva 3’ Kiwiberries Using Near Infrared Spectroscopy. HortTechnology 2024, 34, 172–180. [Google Scholar] [CrossRef]
  27. Lee, J.-E.; Kim, M.-J.; Lee, B.-Y.; Hwan, L.J.; Yang, H.-E.; Kim, M.S.; Hwang, I.G.; Jeong, C.S.; Mo, C. Evaluating Ripeness in Post-Harvest Stored Kiwifruit Using VIS-NIR Hyperspectral Imaging. Postharvest Biol. Technol. 2025, 225, 113496. [Google Scholar] [CrossRef]
  28. Ballabio, D.; Consonni, V. Classification Tools in Chemistry. Part 1: Linear Models. PLS-DA. Anal. Methods 2013, 5, 3790–3798. [Google Scholar] [CrossRef]
  29. Fordellone, M.; Bellincontro, A.; Mencarelli, F. Partial Least Squares Discriminant Analysis: A Dimensionality Reduction Method to Classify Hyperspectral Data. Stat. Appl. Ital. J. Appl. Stat. 2019, 31, 181–200. [Google Scholar]
  30. Wold, S.; Ruhe, A.; Wold, H.; Dunn, W.J., III. The Collinearity Problem in Linear Regression. The Partial Least Squares (PLS) Approach to Generalized Inverses. SIAM J. Sci. Stat. Comput. 1984, 5, 735–743. [Google Scholar] [CrossRef]
  31. Wold, S.; Sjöström, M.; Eriksson, L. PLS-Regression: A Basic Tool of Chemometrics. Chemom. Intell. Lab. Syst. 2001, 58, 109–130. [Google Scholar] [CrossRef]
  32. Lee, L.C.; Liong, C.-Y.; Jemain, A.A. Partial Least Squares-Discriminant Analysis (PLS-DA) for Classification of High-Dimensional (HD) Data: A Review of Contemporary Practice Strategies and Knowledge Gaps. Analyst 2018, 143, 3526–3539. [Google Scholar] [CrossRef] [PubMed]
  33. Barker, M.; Rayens, W. Partial Least Squares for Discrimination. J. Chemom. 2003, 17, 166–173. [Google Scholar] [CrossRef]
  34. Tian, P.; Meng, Q.; Wu, Z.; Lin, J.; Huang, X.; Zhu, H.; Zhou, X.; Qiu, Z.; Huang, Y.; Li, Y. Detection of Mango Soluble Solid Content Using Hyperspectral Imaging Technology. Infrared Phys. Technol. 2023, 129, 104576. [Google Scholar] [CrossRef]
  35. Li, X.; Wei, Y.; Xu, J.; Feng, X.; Wu, F.; Zhou, R.; Jin, J.; Xu, K.; Yu, X.; He, Y. SSC and pH for Sweet Assessment and Maturity Classification of Harvested Cherry Fruit Based on NIR Hyperspectral Imaging Technology. Postharvest Biol. Technol. 2018, 143, 112–118. [Google Scholar] [CrossRef]
  36. Sharma, S.; Sumesh, K.C.; Sirisomboon, P. Rapid Ripening Stage Classification and Dry Matter Prediction of Durian Pulp Using a Pushbroom near Infrared Hyperspectral Imaging System. Measurement 2022, 189, 110464. [Google Scholar] [CrossRef]
  37. Flach, P. Machine Learning: The Art and Science of Algorithms That Make Sense of Data; Cambridge University Press: Cambridge, UK, 2012; ISBN 978-1-107-09639-4. [Google Scholar]
  38. Burkov, A. The Hundred-Page Machine Learning Book; Eleven: The Hague, The Netherlands, 2019; ISBN 978-1-9995795-0-0. [Google Scholar]
  39. Baesens, B. Analytics in a Big Data World: The Essential Guide to Data Science and Its Applications; John Wiley & Sons: Hoboken, NJ, USA, 2014; ISBN 978-1-118-89270-1. [Google Scholar]
  40. Mendez, K.M.; Reinke, S.N.; Broadhurst, D.I. A Comparative Evaluation of the Generalised Predictive Ability of Eight Machine Learning Algorithms across Ten Clinical Metabolomics Data Sets for Binary Classification. Metabolomics 2019, 15, 150. [Google Scholar] [CrossRef] [PubMed]
  41. Sarkar, S.; Basak, J.K.; Moon, B.E.; Kim, H.T. A Comparative Study of PLSR and SVM-R with Various Preprocessing Techniques for the Quantitative Determination of Soluble Solids Content of Hardy Kiwi Fruit by a Portable Vis/NIR Spectrometer. Foods 2020, 9, 1078. [Google Scholar] [CrossRef]
  42. Janaszek-Mańkowska, M.; Ratajski, A. Hyperspectral Imaging and Predictive Modelling for Automated Control of a Prototype Sorting Device for Kiwiberry (Actinidia arguta). Adv. Sci. Technol. Res. J. 2025, 19, 50–64. [Google Scholar] [CrossRef]
  43. Xiong, Z.; Xie, A.; Sun, D.-W.; Zeng, X.-A.; Liu, D. Applications of Hyperspectral Imaging in Chicken Meat Safety and Quality Detection and Evaluation: A Review. Crit. Rev. Food Sci. Nutr. 2015, 55, 1287–1301. [Google Scholar] [CrossRef]
  44. Theodoridis, S.; Koutroumbas, K. Chapter 14-Clustering Algorithms III: Schemes Based on Function Optimization. In Pattern Recognition, 4th ed.; Theodoridis, S., Koutroumbas, K., Eds.; Academic Press: Cambridge, MA, USA, 2009; pp. 701–763. ISBN 978-1-59749-272-0. [Google Scholar]
  45. Rinnan, Å.; van den Berg, F.; Engelsen, S.B. Review of the Most Common Pre-Processing Techniques for near-Infrared Spectra. TrAC Trends Anal. Chem. 2009, 28, 1201–1222. [Google Scholar] [CrossRef]
  46. Maleki, M.R.; Mouazen, A.M.; Ramon, H.; De Baerdemaeker, J. Multiplicative Scatter Correction during On-Line Measurement with Near Infrared Spectroscopy. Biosyst. Eng. 2007, 96, 427–433. [Google Scholar] [CrossRef]
  47. Barnes, R.J.; Dhanoa, M.S.; Lister, S.J. Standard Normal Variate Transformation and De-Trending of Near-Infrared Diffuse Reflectance Spectra. Appl. Spectrosc. 1989, 43, 772–777. [Google Scholar] [CrossRef]
  48. Schafer, R.W. What Is a Savitzky-Golay Filter? [Lecture Notes]. IEEE Signal Process. Mag. 2011, 28, 111–117. [Google Scholar] [CrossRef]
  49. Witteveen, M.; Sterenborg, H.J.C.M.; van Leeuwen, T.G.; Aalders, M.C.G.; Ruers, T.J.M.; Post, A.L. Comparison of Preprocessing Techniques to Reduce Nontissue-Related Variations in Hyperspectral Reflectance Imaging. J. Biomed. Opt. 2022, 27, 106003. [Google Scholar] [CrossRef]
  50. Kucheryavskiy, S. Mdatools–R Package for Chemometrics. Chemom. Intell. Lab. Syst. 2020, 198, 103937. [Google Scholar] [CrossRef]
  51. R Core Team. R: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing: Vienna, Austria, 2025. [Google Scholar]
  52. Kuhn, M. Building Predictive Models in R Using the Caret Package. J. Stat. Softw. 2008, 28, 1–26. [Google Scholar] [CrossRef]
  53. Liland, K.H.; Mevik, B.-H.; Wehrens, R.; Hiemstra, P. Pls: Partial Least Squares and Principal Component Regression; The R Foundation: Vienna, Austria, 1999. [Google Scholar]
  54. Karatzoglou, A.; Smola, A.; Hornik, K.; Zeileis, A. Kernlab-An S4 Package for Kernel Methods in R. J. Stat. Softw. 2004, 11, 1–20. [Google Scholar] [CrossRef]
  55. Karatzoglou, A.; Smola, A.; Hornik, K.; N.I.; Maniscalco, M.A.; Teo, C.H. Kernlab: Kernel-Based Machine Learning Lab, R package version 0.9-32; The Comprehensive R Archive Network (CRAN): Vienna, Austria, 2024. [Google Scholar]
  56. Ting, K.M.; Witten, I.H. Issues in Stacked Generalization. J. Artif. Intell. Res. 1999, 10, 271–289. [Google Scholar] [CrossRef]
  57. Cohen, J. A Coefficient of Agreement for Nominal Scales. Educ. Psychol. Meas. 1960, 20, 37–46. [Google Scholar] [CrossRef]
  58. Lavazza, L.; Morasca, S. Comparing ϕ and the F-Measure as Performance Metrics for Software-Related Classifications. Empir. Softw. Eng. 2022, 27, 185. [Google Scholar] [CrossRef]
  59. Hastie, T.; Tibshirani, R.; Friedman, J. Support Vector Machines and Flexible Discriminants. In The Elements of Statistical Learning: Data Mining, Inference, and Prediction; Springer New York: New York, NY, USA, 2009; pp. 417–458. ISBN 978-0-387-84858-7. [Google Scholar]
  60. Sokolova, M.; Lapalme, G. A Systematic Analysis of Performance Measures for Classification Tasks. Inf. Process. Manag. 2009, 45, 427–437. [Google Scholar] [CrossRef]
  61. Japkowicz, N.; Shah, M. Evaluating Learning Algorithms: A Classification Perspective; Cambridge University Press: Cambridge, UK, 2011; ISBN 978-0-521-19600-0. [Google Scholar]
  62. Yang, H.; Chen, Q.; Qian, J.; Li, J.; Lin, X.; Liu, Z.; Fan, N.; Ma, W. Determination of Dry-Matter Content of Kiwifruit before Harvest Based on Hyperspectral Imaging. AgriEngineering 2024, 6, 52–63. [Google Scholar] [CrossRef]
  63. Mishra, P. Developing Multifruit Global Near-Infrared Model to Predict Dry Matter Based on Just-in-Time Modeling. J. Chemom. 2024, 38, e3540. [Google Scholar] [CrossRef]
  64. Canty, A.; Ripley, B. Boot: Bootstrap R (S-Plus) Functions; R Package Version 1.3-31; The Comprehensive R Archive Network (CRAN): Vienna, Austria, 2024. [Google Scholar] [CrossRef]
  65. Mersmann, O. Microbenchmark: Accurate Timing Functions; R Package Version 1.5.0; The Comprehensive R Archive Network (CRAN): Vienna, Austria, 2024. [Google Scholar] [CrossRef]
Figure 1. Vision chamber with equipment (part of a prototype device for sorting kiwiberry fruits): a—chamber housing, b—inlet, c—outlet, d—250 W halogen lamp, e—FX10 camera, f—FX17 camera, g—mounting plate, h—fan, i—belt conveyor, j—carrier conveyor (fragment), k—kiwiberry, l—electric motor driving the conveyor, m—PC computer, n—support frame element, o—Camera Link data transmission cable.
Figure 1. Vision chamber with equipment (part of a prototype device for sorting kiwiberry fruits): a—chamber housing, b—inlet, c—outlet, d—250 W halogen lamp, e—FX10 camera, f—FX17 camera, g—mounting plate, h—fan, i—belt conveyor, j—carrier conveyor (fragment), k—kiwiberry, l—electric motor driving the conveyor, m—PC computer, n—support frame element, o—Camera Link data transmission cable.
Processes 13 03446 g001
Table 1. Dataset sizes and class proportions after train/test split.
Table 1. Dataset sizes and class proportions after train/test split.
DatasetTrainingTest
Class AClass BClass AClass B
‘Weiki’ (W)15261524380380
‘Geneva’ (G)852852212212
‘Weiki’ + ‘Geneva’ (WG)23782376592592
Table 2. Confusion matrix for binary classification.
Table 2. Confusion matrix for binary classification.
Predicted Positive (A)Predicted Negative (B)Overall Observed
Observed positive (A)TP–true positiveFN–false negativeOP = TP + FN
Observed negative (B)FP–false positiveTN–true negativeON = FP + TN
Overall predictedPP = TP + FPPN = FN + TNn = TP + FN + FP + TN
Table 3. ‘Geneva’ kiwiberry classification results.
Table 3. ‘Geneva’ kiwiberry classification results.
ACC (%)κ (%)F05 (–)PPV (%)TPR (%)TNR (%)LR+
(–)
LR
(–)
nC (2)
(–)
Calibration
G_PLS-DA (D2) (1)89.6779.3487.3885.5895.4283.925.930.05420
G_sSVM_L (D2)92.3784.7490.5389.1596.4888.268.220.04020
G_pSVM_L (D2)89.5078.9988.1787.1092.7286.276.750.084
G_pSVM_R (SG)93.1986.3891.6190.4496.6089.799.460.038
Prediction
G_PLS-DA (D2)92.2284.4389.8488.0997.6486.797.390.02720
G_sSVM_L (D2)69.1038.2170.6074.8557.5580.662.980.52620
G_pSVM_L (D2)92.9285.8591.8290.9995.2890.5710.100.052
G_pSVM_R (SG)96.9393.8795.3294.22100.0093.8716.310.000
(1) G denotes ‘Geneva’ variety and parentheses include the optimal spectral data correction (2) nC–optimal number of PLS components selected based on κ (Cohen’s kappa) in PLS-DA and score-based models.
Table 4. ‘Weiki’ kiwiberry classification results.
Table 4. ‘Weiki’ kiwiberry classification results.
ACC (%)κ (%)F05 (–)PPV (%)TPR (%)TNR (%)LR+
(–)
LR
(–)
nC (2)
(–)
Calibration
W_PLS-DA (D2) (1)94.3988.7993.4492.7496.3392.4512.780.04018
W_sSVM_L (D2)94.4388.8593.6893.1395.9492.9113.560.04418
W_pSVM_L (D2)94.3388.6693.6993.2395.6193.0413.760.047
W_pSVM_R (D2)95.5191.0294.7594.2196.9994.0316.260.032
Prediction
W_PLS-DA (D2)91.8483.6890.2188.9795.5388.168.070.05118
W_sSVM_L (D2)68.6837.3768.9869.8365.7971.582.310.47818
W_pSVM_L (D2)92.2484.4790.7589.6395.5388.958.640.050
W_pSVM_R (D2)92.8985.7991.0989.7696.8488.958.760.036
(1) W denotes ‘Weiki’ variety and parentheses include the optimal spectral data correction (2) nC–optimal number of PLS components selected based on κ (Cohen’s kappa) in PLS-DA and score-based models.
Table 5. Combined ‘Geneva’ and ‘Weiki’ kiwiberry classification results.
Table 5. Combined ‘Geneva’ and ‘Weiki’ kiwiberry classification results.
ACC (%)κ (%)F05 (–)PPV (%)TPR (%)TNR (%)LR+
(–)
LR
(–)
nC (2)
(–)
Calibration
WG_PLS-DA (D2) (1)90.3080.6189.0888.1193.1987.427.410.07820
WG_sSVM_L (D2)90.4180.8289.5088.7892.5188.307.910.08519
WG_pSVM_L (D2)90.1880.3589.3288.6492.1888.177.800.089
WG_pSVM_R (D1)93.3186.6292.0491.1096.0190.6110.240.044
Prediction
WG_PLS-DA (D2)88.9477.8787.3686.0792.9184.976.180.08320
WG_sSVM_L (D2)62.1624.3262.1562.5460.6463.681.670.61819
WG_pSVM_L (D2)89.9579.9088.6487.6093.0786.827.060.080
WG_pSVM_R (D1)92.4084.8090.5189.1096.6288.188.170.038
(1) WG denotes the combined dataset of ‘Geneva’ and ‘Weiki’ varieties and parentheses include the optimal spectral data correction (2) nC–optimal number of PLS components selected based on κ (Cohen’s kappa) in PLS-DA and score-based models.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Janaszek-Mańkowska, M.; Mańkowski, D.R. Hyperspectral Classification of Kiwiberry Ripeness for Postharvest Sorting Using PLS-DA and SVM: From Baseline Models to Meta-Inspired Stacked SVM. Processes 2025, 13, 3446. https://doi.org/10.3390/pr13113446

AMA Style

Janaszek-Mańkowska M, Mańkowski DR. Hyperspectral Classification of Kiwiberry Ripeness for Postharvest Sorting Using PLS-DA and SVM: From Baseline Models to Meta-Inspired Stacked SVM. Processes. 2025; 13(11):3446. https://doi.org/10.3390/pr13113446

Chicago/Turabian Style

Janaszek-Mańkowska, Monika, and Dariusz R. Mańkowski. 2025. "Hyperspectral Classification of Kiwiberry Ripeness for Postharvest Sorting Using PLS-DA and SVM: From Baseline Models to Meta-Inspired Stacked SVM" Processes 13, no. 11: 3446. https://doi.org/10.3390/pr13113446

APA Style

Janaszek-Mańkowska, M., & Mańkowski, D. R. (2025). Hyperspectral Classification of Kiwiberry Ripeness for Postharvest Sorting Using PLS-DA and SVM: From Baseline Models to Meta-Inspired Stacked SVM. Processes, 13(11), 3446. https://doi.org/10.3390/pr13113446

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop