Rapid Determination of Nutrient Concentrations in Hass Avocado Fruit by Vis/NIR Hyperspectral Imaging of Flesh or Skin

Fatty acid composition and mineral nutrient concentrations can affect the nutritional and postharvest properties of fruit and so assessing the chemistry of fresh produce is important for guaranteeing consistent quality throughout the value chain. Current laboratory methods for assessing fruit quality are time-consuming and often destructive. Non-destructive technologies are emerging that predict fruit quality and can minimise postharvest losses, but it may be difficult to develop such technologies for fruit with thick skin. This study aimed to develop laboratory-based hyperspectral imaging methods (400–1000 nm) for predicting proportions of six fatty acids, ratios of saturated and unsaturated fatty acids, and the concentrations of 14 mineral nutrients in Hass avocado fruit from 219 flesh and 194 skin images. Partial least squares regression (PLSR) models predicted the ratio of unsaturated to saturated fatty acids in avocado fruit from both flesh images (R2 = 0.79, ratio of prediction to deviation (RPD) = 2.06) and skin images (R2 = 0.62, RPD = 1.48). The best-fit models predicted parameters that affect postharvest processing such as the ratio of oleic:linoleic acid from flesh images (R2 = 0.67, RPD = 1.63) and the concentrations of boron (B) and calcium (Ca) from flesh images (B: R2 = 0.61, RPD = 1.51; Ca: R2 = 0.53, RPD = 1.71) and skin images (B: R2 = 0.60, RPD = 1.55; Ca: R2 = 0.68, RPD = 1.57). Many quality parameters predicted from flesh images could also be predicted from skin images. Hyperspectral imaging represents a promising tool to reduce postharvest losses of avocado fruit by determining internal fruit quality of individual fruit quickly from flesh or skin images.


Introduction
Techniques that evaluate the internal quality of fruit and vegetables can help to maintain product quality and minimise economic losses during postharvest storage and handling [1,2]. Current methods for measuring internal quality parameters such as fatty acid composition and nutrient levels are often destructive, expensive, time-consuming, and require precise sample preparation [3,4]. Hyperspectral imaging is a rapidly developing technology for fast and non-destructive measurements that possesses advantages over conventional spectroscopy [5][6][7][8]. Homogenisation of the sample is not necessary because, in contrast to other sensory methods such as visible near-infrared (VNIR) spectroscopy, hyperspectral imaging can scan the entire sample and, thus, account for sample heterogeneity [7]. Hyperspectral imaging also generates a set of images within narrow spectral-wavelength bands,

Sample Collection and Preparation
A total of 400 mature Hass fruit were collected from 40 trees. Orchard 1 contained blocks of avocado cultivars Hass and Shepard that were each 26 rows wide, with the trees being 13 years old. Orchard 2 contained blocks of avocado cultivars Hass, Shepard, Lamb Hass, and Wurtz that were 6-22 rows wide, with the trees being 18-21 years old. Hass fruit were collected from two transects in orchard 1 and eight transects in orchard 2. A transect consisted of four trees, starting at a tree bordering another cultivar (row 1) and then proceeding perpendicularly from the other cultivar to trees in rows 2, 3, and the middle row of the block ( Figure 1A). Ten fruit were collected in a stratified design from each tree, with each tree divided into five sectors on the side of the tree that faced the neighbouring cultivar ( Figure 1B). Two fruit were sampled per sector, one from the inside and one from the outside of the canopy, on either 18 April or 9/10 May 2018, depending on the orchard. Six fruit per tree were selected randomly for further analyses. General maturity of the fruit at either orchard was determined by measuring the percentage dry matter of some fruit within the same block used for sample collection. Fruit were kept in the shade until moved to a cold room (4 • C). Fruit collected in the morning arrived at the cold room on the afternoon of the collection day, and fruit collected in the afternoon arrived at the cold room by midday of the following day. The recommended storage temperature for Hass fruit is 4-6 • C [38,39]. Fruit were stored in the cold room for 10 or 20 d, before being moved to room temperature (21 • C) to allow the onset of ripening. Fruit were ripe after 10.6 ± 1.0 d (mean ± SE) at room temperature. Ripeness was confirmed by measuring skin and flesh firmness with a handheld sclerometer (8 mm head; Lutron Electronic Model: FR-5120, Coopersburg, PA). A fruit was considered ripe when the maximum force required to impress the sclerometer tip 1 mm deep was <15 N for the skin and <5 N for the flesh [11,40]. Flesh firmness was measured after removal of small patches of skin at two locations along the equator of the fruit, with the two measurements taken at 90 • from each other. Each avocado was placed under the camera, and an image of the side of the ripe fruit with the skin intact was captured, before each fruit was cut vertically in half, and then an image of the flesh was captured. Subsamples of the flesh were collected immediately after imaging to measure the: (i) relative contribution of six fatty acids to the total fatty acid composition; (ii) ratios of saturated and unsaturated fatty acids; and (iii) concentrations of 14 mineral nutrients.

Sample Collection and Preparation
A total of 400 mature Hass fruit were collected from 40 trees. Orchard 1 contained blocks of avocado cultivars Hass and Shepard that were each 26 rows wide, with the trees being 13 years old. Orchard 2 contained blocks of avocado cultivars Hass, Shepard, Lamb Hass, and Wurtz that were 6-22 rows wide, with the trees being 18-21 years old. Hass fruit were collected from two transects in orchard 1 and eight transects in orchard 2. A transect consisted of four trees, starting at a tree bordering another cultivar (row 1) and then proceeding perpendicularly from the other cultivar to trees in rows 2, 3, and the middle row of the block ( Figure 1A). Ten fruit were collected in a stratified design from each tree, with each tree divided into five sectors on the side of the tree that faced the neighbouring cultivar ( Figure 1B). Two fruit were sampled per sector, one from the inside and one from the outside of the canopy, on either 18 April or 9/10 May 2018, depending on the orchard. Six fruit per tree were selected randomly for further analyses. General maturity of the fruit at either orchard was determined by measuring the percentage dry matter of some fruit within the same block used for sample collection. Fruit were kept in the shade until moved to a cold room (4 °C). Fruit collected in the morning arrived at the cold room on the afternoon of the collection day, and fruit collected in the afternoon arrived at the cold room by midday of the following day. The recommended storage temperature for Hass fruit is 4-6 °C [38,39]. Fruit were stored in the cold room for 10 or 20 d, before being moved to room temperature (21 °C) to allow the onset of ripening. Fruit were ripe after 10.6 ± 1.0 d (mean ± SE) at room temperature. Ripeness was confirmed by measuring skin and flesh firmness with a handheld sclerometer (8 mm head; Lutron Electronic Model: FR-5120, Coopersburg, PA). A fruit was considered ripe when the maximum force required to impress the sclerometer tip 1 mm deep was <15 N for the skin and <5 N for the flesh [11,40]. Flesh firmness was measured after removal of small patches of skin at two locations along the equator of the fruit, with the two measurements taken at 90° from each other. Each avocado was placed under the camera, and an image of the side of the ripe fruit with the skin intact was captured, before each fruit was cut vertically in half, and then an image of the flesh was captured. Subsamples of the flesh were collected immediately after imaging to measure the: (i) relative contribution of six fatty acids to the total fatty acid composition; (ii) ratios of saturated and unsaturated fatty acids; and (iii) concentrations of 14 mineral nutrients.  Hass was planted in 20 contiguous rows, and fruit were sampled from individual trees at rows 1, 2, 3 and 10 from the mixed block; and (B) the stratified sampling design for each avocado tree: two fruit were sampled from each of the five sectors, one from the inside and one from the outside of the canopy in each sector.

Imaging System and Spectral Profile Extraction
Images were captured with a laboratory-based 12-bit line scanner camera (Pika XC2, Bozeman, MT) with a lens with 23 mm focal length and four current-controlled wide-spectrum quartz-halogen lights. The camera had a spectral resolution of~1.3 nm and captured 462 wavelengths between~400 and 1000 nm. The samples were positioned on a black tray on a translation stage, the exposure time was adjusted to 19.4 ms, and the translation stage moved at 1.23 mm s −1 . Image acquisition and data extraction were conducted using Spectronon Pro software (Version 2.112; Resonon, Bozeman, MT, USA). The mean raw reflectance of each image was extracted by marking a region of interest (ROI) for each skin and flesh image. The ROI for skin images contained the skin of one side of the fruit excluding the area in the centre of the fruit where reflection was very intense, whereas the ROI for flesh images contained all the flesh surrounding the seed. We then calculated the mean corrected relative reflectance (R) from the raw spectral reflectance, R 0 , within Spectronon as shown in Equation (1): where D is the reflectance of a dark image (camera lens covered) and W is the reflectance of a white Teflon sheet that reflects~99% of incident light [5]. This corrects for the spectral curve of the fruit surface. The 100% reflectivity was scaled to 10,000 (integers) by default. The mean corrected relative reflectance was used for model development. The fruit half that contained the seed was stored at −18 • C until further processing.

Determination of Fatty Acid Composition
Approximately 40 g of flesh was taken from each fruit and the protocol described by Bai et al. [23] was used to extract oil. In brief, the flesh was mashed finely before 30 mL of pentane was added. The mixture was transferred into a round-bottom flask after 15 min of stirring, and pentane was evaporated from the oil using an air-tight vacuum rotator for 10 min. The extracted oil was stored in glass vials at 4 • C. One microlitre of the extracted oil was taken and 0.7 mL of anhydrous methanol dibutylhydroxytoluene solution and 25 µL of 32% HCl was added. The mixture was incubated for 20 h at 65 • C before 0.5 mL of deionised water and 0.5 mL of n-hexane was added. The mixture was shaken for 30 s before it was rinsed again with 0.5 mL deionised water. The top layer of the mixture was collected and Na 2 SO 4 was added to remove water from the oil in hexane. Fatty acid composition was determined by gas chromatography-mass spectrometry. Peak areas were used to calculate the relative proportions of each fatty acid in the sample. Fatty acids that accounted consistently for less than 0.3% of the fatty acid composition were excluded.

Determination of Mineral Nutrient Concentrations
Mineral nutrient concentrations of each fruit were assessed using a subsample that contained conical pieces of flesh from two locations, near the apex and along the equator of each fruit. Total nitrogen (N) and total carbon (C) concentrations were determined by combustion analysis (TruSpec ® , LECO Corporation, St. Joseph, MI) [41,42]. Aluminium (Al), boron (B), calcium (Ca), copper (Cu), iron (Fe), magnesium (Mg), manganese (Mn), sodium (Na), phosphorus (P), potassium (K), sulphur (S) and zinc (Zn) concentrations were determined by inductively coupled plasma-atomic emission spectroscopy (Vista Pro ® , Varian Incorporation, Palo Alto, CA) [43][44][45]. Mineral nutrient concentrations of flesh and skin were measured from an additional 25 samples to explore whether individual nutrient concentrations were correlated between flesh and skin, and to understand how skin reflectance could potentially predict flesh nutrient concentrations. The skin samples comprised the skin that was removed above the two locations, near the apex and along the equator of each fruit, where the conical flesh samples were taken.

Model Development
Damaged, sunburnt or otherwise unfit fruit were removed from the data set, leaving 219 flesh images and 194 skin images. Reflectance data from these flesh and skin images were each divided into calibration sets and test sets (Tables 1 and 2), with approximately 75% of samples being assigned to the calibration sets and the remaining 25% being assigned to the external test sets [46]. Spectral outliers in the samples, if any, were detected using a Hotelling's T 2 test (with 95% level of confidence) and removed from the data set [47]. Spectral pre-treatments such as Savitzky-Golay first-, second-and third-order derivatives, standard normal variate (SNV), orthogonal signal correction (OSC) and multiplicative scatter correction (MSC) were performed on calibration data to remove the influence of undesired effects including light scattering, baseline shifts, random noise, and uncontrolled external factors [48,49]. We then developed partial least squares regression (PLSR) models using both the raw and transformed data to correlate the proportions of six fatty acids, the ratios of unsaturated to saturated and oleic to linoleic fatty acids, and the mineral nutrient concentrations (C, N, Al, B, Ca, Cu, Fe, K, Mg, Mn, Na, P, S and Zn) to relative reflectances measured in the full spectral range of 400-1000 nm [50]. PLSR is the preferred method for datasets having highly correlated independent variables and when the number of samples is smaller than the number of variables. A leave-one-out (full) cross-validation method was used to evaluate the best performance of the model and avoid over-fitting [51,52]. We reduced the number of spectral wavelengths stepwise, after finding the best transformation for the data set, by removing wavelengths with the lowest β-coefficients [53]. We continued removing wavelengths with low β-coefficients until the model fit decreased. Removing wavelengths can increase the model accuracy by improving computation of the model [9,54]. The best fitted models were selected by choosing the models with the highest coefficient of determination (R 2 cal ) and the lowest root mean squares error in the calibration sets (RMSEc) and in the cross-validation sets (R 2 val and RMSEv). The R 2 and RMSE were defined as shown in Equations (2) and (3), respectively [55].
where y i andŷ i were the reference and predicted values in the ith sample, respectively,ȳ was the mean value of each reference value, and n was the number of samples. The prediction ability of the final models was tested using the test set. We then calculated the ratio of prediction to deviation (RPD) to evaluate the prediction ability of the model as shown in Equation (4): where SD Test is the standard deviation of the observed values, and RMSE Test is the root square error of the prediction from the test set ( t ). More details on the PLSR specifics and calculations are provided by Tahmasbian et al. [53,56]. Transformations, outlier detection and removal, and all parts of the model development were performed with Unscrambler software (Version: 10.5.1; CAMO, Oslo, Norway).

Reflectance
Reflectance from flesh samples was higher than from skin samples, and the spectral patterns of flesh and skin images differed greatly at wavelengths between 400 and 650 nm (Figure 2). Reflectance from flesh samples dropped at wavelengths around 675 nm (Figure 2).

Reflectance
Reflectance from flesh samples was higher than from skin samples, and the spectral patterns of flesh and skin images differed greatly at wavelengths between 400 and 650 nm (Figure 2). Reflectance from flesh samples dropped at wavelengths around 675 nm (Figure 2).

Predicting the Proportions of Fatty Acids and Concentrations of Nutrients from Flesh Images
We fit PLSR models that predicted with RPD ≥ 1.4 the proportions of palmitic acid (C16:0), palmitoleic acid (C16:1 cis) and linoleic acid (C18:2) in fruit flesh from images of the flesh (Table 3). Models with RPD values above 1.4 provide good predictions and models with RPD values above 2.0 provide excellent predictions [57]. We also fit PLSR models that predicted the ratios of unsaturated to saturated fatty acids (UFA:SFA) and oleic to linoleic acid (O:L) with RPD ≥ 1.4. The best-fit PLSR models for UFA:SFA provided R 2 cal = 0.80 and RMSEC = 0.12, and R 2 val = 0.75 and RMSEV = 0.13, in the cross-validation (Table 3; Figure 3A,B). The best-fit PLSR models for O:L provided R 2 cal = 0.73 and RMSEC = 0.67, and R 2 val = 0.65 and RMSEV = 0.76, in the cross-validation (Table 3; Figure 3B). These models for UFA:SFA and O:L provided prediction abilities for the test set of R 2 = 0.79 and RPD = 2.11, and R 2 = 0.67 and RPD = 1.63, respectively (Table 3; Figure 3A,B). Both final models incorporated wavelength reduction ( Table 3). The most important wavelengths were between 750 and 840 nm and above 930 nm for the UFA:SFA ratio, and between 550 and 660 nm and above 930 nm for the O:L ratio ( Figure 4A,B). We could not fit models to predict the proportions of stearic acid (C18:0), elaidic acid (C18:1 trans) and oleic acid (C18:1 cis) with RPD ≥ 1.4. Oleic acid accounted for approximately 40% of the fatty acids whereas elaidic acid and stearic acid together accounted for only 8% of the fatty acids (Table 1).

Predicting the Proportions of Fatty Acids and Concentrations of Nutrients from Flesh Images
We fit PLSR models that predicted with RPD ≥ 1.4 the proportions of palmitic acid (C16:0), palmitoleic acid (C16:1 cis) and linoleic acid (C18:2) in fruit flesh from images of the flesh (Table 3). Models with RPD values above 1.4 provide good predictions and models with RPD values above 2.0 provide excellent predictions [57]. We also fit PLSR models that predicted the ratios of unsaturated to saturated fatty acids (UFA:SFA) and oleic to linoleic acid (O:L) with RPD ≥ 1.4. The best-fit PLSR models for UFA:SFA provided R 2 cal = 0.80 and RMSE C = 0.12, and R 2 val = 0.75 and RMSE V = 0.13, in the cross-validation (Table 3; Figure 3A,B). The best-fit PLSR models for O:L provided R 2 cal = 0.73 and RMSE C = 0.67, and R 2 val = 0.65 and RMSE V = 0.76, in the cross-validation (Table 3; Figure 3B). These models for UFA:SFA and O:L provided prediction abilities for the test set of R 2 = 0.79 and RPD = 2.11, and R 2 = 0.67 and RPD = 1.63, respectively (Table 3; Figure 3A,B). Both final models incorporated wavelength reduction ( Table 3). The most important wavelengths were between 750 and 840 nm and above 930 nm for the UFA:SFA ratio, and between 550 and 660 nm and above 930 nm for the O:L ratio ( Figure 4A,B). We could not fit models to predict the proportions of stearic acid (C18:0), elaidic acid (C18:1 trans) and oleic acid (C18:1 cis) with RPD ≥ 1.4. Oleic acid accounted for approximately 40% of the fatty acids whereas elaidic acid and stearic acid together accounted for only 8% of the fatty acids (Table 1). Table 3. Performance of partial least squares regression (PLSR) models in predicting fatty acid composition (%), carbon (%), nitrogen (%) and other mineral nutrient concentrations (mg kg −1 ) in Hass avocado fruit flesh from hyperspectral images of the fruit flesh.  We fit PLSR models that predicted the concentrations of mineral nutrients including C, Al, B, Ca, Cu, Fe, K, Mg, P, S and Zn with RPD ≥ 1.4 (11 out of 14 elements) ( Table 3). The best-fit PLSR models for B provided R 2 cal = 0.74 and RMSEC = 9.29, and R 2 val = 0.63 and RMSEV = 11.10, in the crossvalidation (Table 3; Figure 3C). The best-fit PLSR models for Ca provided R 2 cal = 0.55 and RMSEC = 37.37, and R 2 val = 0.43 and RMSEV = 42.12, in the cross-validation (Table 3; Figure 3D). The models for B and Ca provided acceptable prediction abilities for the external test set of R 2 = 0.61 and RPD = 1.51 and R 2 = 0.53 and RPD = 1.71, respectively ( Table 3). The R 2 of the external test set for Ca was only 0.53 but, considering that the RMSETest was 35.58 and the data range was 42.48 to 409.51 mg kg −1 , the prediction was acceptable with low accuracy, particularly when comparing samples with low vs. with high Ca concentrations. Both final models required no wavelength reduction ( Table 3). The most important wavelengths were around 600 and 770 nm and above 960 nm for B concentration ( Figure  4C) and around 550, 640, 660 and 930 nm for Ca concentration ( Figure 4D). We could not develop models that predicted the concentrations of N, Mn or Na with RPD ≥ 1.4 (Table 3). We fit PLSR models that predicted the concentrations of mineral nutrients including C, Al, B, Ca, Cu, Fe, K, Mg, P, S and Zn with RPD ≥ 1.4 (11 out of 14 elements) ( Table 3). The best-fit PLSR models for B provided R 2 cal = 0.74 and RMSE C = 9.29, and R 2 val = 0.63 and RMSE V = 11.10, in the cross-validation (Table 3; Figure 3C). The best-fit PLSR models for Ca provided R 2 cal = 0.55 and RMSE C = 37.37, and R 2 val = 0.43 and RMSE V = 42.12, in the cross-validation (Table 3; Figure 3D). The models for B and Ca provided acceptable prediction abilities for the external test set of R 2 = 0.61 and RPD = 1.51 and R 2 = 0.53 and RPD = 1.71, respectively ( Table 3). The R 2 of the external test set for Ca was only 0.53 but, considering that the RMSE Test was 35.58 and the data range was 42.48 to 409.51 mg kg −1 , the prediction was acceptable with low accuracy, particularly when comparing samples with low vs. with high Ca concentrations. Both final models required no wavelength reduction ( Table 3). The most important wavelengths were around 600 and 770 nm and above 960 nm for B concentration ( Figure 4C) and around 550, 640, 660 and 930 nm for Ca concentration ( Figure 4D). We could not develop models that predicted the concentrations of N, Mn or Na with RPD ≥ 1.4 (Table 3).

Predicting the Proportions of Fatty Acids and Concentrations of Nutrients from Skin Images
We fit PLSR models that predicted with RPD ≥ 1.4 the proportions of palmitic acid (C16:0) and linoleic acid (C18:2) in fruit flesh from images of the skin (Table 4). We also fit a PLSR model that predicted the ratio of UFA:SFA with RPD ≥ 1.4 (Table 4; Figure 5A). This model provided R 2 cal = 0.69 and RMSE C = 0.17, and R 2 val = 0.64 and RMSE V = 0.18, in the cross-validation (Table 4; Figure 5A). The model provided acceptable prediction abilities for the external test set, with R 2 = 0.62 and RPD = 1.48. This model incorporated wavelength reduction. The most important wavelengths were around 400 nm, between 700 and 750 nm, and above 930 nm for the ratio of UFA:SFA ( Figure 4A). We could not develop models that predicted the proportions of palmitoleic acid (C16:1 cis), stearic acid (C18:0), elaidic acid (C18:1 trans) or oleic acid (C18:1 cis), or the O:L ratio, with RPD ≥ 1.4 from images of the skin.
predicted the ratio of UFA:SFA with RPD ≥ 1.4 (Table 4; Figure 5A). This model provided R 2 cal = 0.69 and RMSEC = 0.17, and R 2 val = 0.64 and RMSEV = 0.18, in the cross-validation (Table 4; Figure 5A). The model provided acceptable prediction abilities for the external test set, with R 2 = 0.62 and RPD = 1.48. This model incorporated wavelength reduction. The most important wavelengths were around 400 nm, between 700 and 750 nm, and above 930 nm for the ratio of UFA:SFA ( Figure 4A). We could not develop models that predicted the proportions of palmitoleic acid (C16:1 cis), stearic acid (C18:0), elaidic acid (C18:1 trans) or oleic acid (C18:1 cis), or the O:L ratio, with RPD ≥ 1.4 from images of the skin.
We fit PLSR models that predicted with RPD ≥ 1.4 the concentrations of B, Ca, Fe, K, Mg, S and Zn in the flesh from images of the skin ( Table 4). The best-fit PLSR models for B provided R 2 cal = 0.70 and RMSEC = 9.96, and R 2 val = 0.48 and RMSEV = 13.11, in the cross-validation (Table 4; Figure 5C). The best-fit PLSR models for Ca provided R 2 cal = 0.61 and RMSEC = 39.78, and R 2 val = 0.61 and RMSEV = 40.44, in the cross-validation (Table 4; Figure 5D). The models provided acceptable prediction abilities for the external test set with R 2 = 0.60 and RPD = 1.55 for B and R 2 = 0.68 and RPD = 1.57 for Ca (Table 4). Both final models required no wavelength reduction ( Table 4). The most important wavelengths were around 400, 700, 760 and above 940 nm for B concentration and around 750 nm for Ca concentration ( Figure 4C,D). We could not develop models to predict with RPD ≥ 1.4 the concentrations of C, N, Al, Cu, Mn, Na or P of avocado flesh using images of the skin (Table 4).  We fit PLSR models that predicted with RPD ≥ 1.4 the concentrations of B, Ca, Fe, K, Mg, S and Zn in the flesh from images of the skin ( Table 4). The best-fit PLSR models for B provided R 2 cal = 0.70 and RMSE C = 9.96, and R 2 val = 0.48 and RMSE V = 13.11, in the cross-validation (Table 4; Figure 5C). The best-fit PLSR models for Ca provided R 2 cal = 0.61 and RMSE C = 39.78, and R 2 val = 0.61 and RMSE V = 40.44, in the cross-validation (Table 4; Figure 5D). The models provided acceptable prediction abilities for the external test set with R 2 = 0.60 and RPD = 1.55 for B and R 2 = 0.68 and RPD = 1.57 for Ca (Table 4). Both final models required no wavelength reduction ( Table 4). The most important wavelengths were around 400, 700, 760 and above 940 nm for B concentration and around 750 nm for Ca concentration ( Figure 4C,D). We could not develop models to predict with RPD ≥ 1.4 the concentrations of C, N, Al, Cu, Mn, Na or P of avocado flesh using images of the skin (Table 4).

Relationship between Mineral Nutrient Concentrations of the Flesh and the Skin
Flesh quality parameters predicted from flesh images could often be predicted from skin images (Tables 3 and 4) but, for some parameters, the prediction abilities from skin images were too weak, with RPD < 1.4 ( Table 4). The concentrations of six out of 14 mineral nutrients were correlated between flesh and skin samples ( Table 5). Five of these nutrients (B, Ca, Mg, Mn, Na) had similar prediction abilities from flesh and skin images (Tables 3 and 4). However, we were only able to fit a PLSR model with RPD ≥ 1.4 for P concentration from images of the flesh but not the skin.

Discussion
Hyperspectral imaging successfully predicted some fatty acid composition and mineral nutrient concentrations of Hass avocado fruit. Predictions were possible using both flesh and skin images, allowing for rapid and, in the case of skin images, non-destructive quality assessments. The predictive ability of the models was associated with specific wavelengths. Hyperspectral imaging represents a promising tool for estimating parameters that influence the postharvest and nutritional properties of avocado fruit.
Hyperspectral imaging was a useful tool for predicting fatty acid composition, including palmitic, palmitoleic and linoleic acid abundance and unsaturated to saturated fatty acid (UFA:SFA) and oleic to linoleic acid (O:L) ratios, from either flesh or skin images, or both. Hyperspectral imaging could also be used to estimate the concentrations of many mineral nutrients, including C, Al, B, Ca, Cu, Fe, K, Mg, P, S and Zn. Imaging has been used to predict maturity and percentage dry matter of avocado [4], but has not been used previously to predict fatty acid profile or mineral nutrient composition in avocado.
Most internal quality parameters of avocado fruit that could be predicted from flesh images could also be predicted from skin images. These included palmitic acid and linoleic acid abundance, the ratio of unsaturated to saturated fatty acids (UFA:SFA), and the concentrations of many mineral nutrients, including B, Ca, Fe, K, Mg, S and Zn. Hyperspectral imaging is, therefore, a promising tool for non-destructively predicting internal fruit quality. Mineral nutrients do not absorb light in the Vis/NIR region and so Vis/NIR spectroscopy cannot detect minerals directly [7]. Models must detect minerals and their concentrations indirectly, for example through organic complexes the minerals bind to [7,58]. Indirect predictions are commonly used, especially for minerals [7,59,60]. In contrast, oil content and fatty acid composition can be assessed directly because molecular bonds such as O-H and C-H cause reflectance [61,62]. The concentrations of six mineral nutrients (B, Ca, Mg, Mn, Na, P) were correlated between flesh and skin samples whereas the concentrations of four mineral nutrients (Fe, K, S, Zn) were not correlated between flesh and skin samples, despite developing acceptable models using both flesh and skin images. Internal quality prediction might have been possible from skin images if light penetrated deeply through the skin and into the flesh. We did not measure light penetration in our samples. However, some short wavelengths around 400 nm had high β-coefficients in the models that used avocado skin images to predict UFA:SFA or B concentration. Shorter wavelengths penetrate more deeply than longer wavelengths into biological samples [63].
We identified specific wavelengths important for predicting fatty acid composition and mineral nutrient concentration. The wavelengths with the highest β-coefficients, thus contributing most to the predictive ability of the models, were between 970 and 1000 nm for UFA:SFA and O:L from either flesh or skin images. Reflectance in the 950-1000 nm region in other crops has been associated with prominent molecular bonds such as O-H and C-H in fatty acids [61,64]. High β-coefficients at 580, 590, 780 and 960 nm were important in predicting Ca concentrations from flesh images and high β-coefficients around 650, 700 and 760 nm were important in predicting Ca concentrations from skin images. Spectral patterns and wavelengths associated with alkaline earth metals such as Ca and Mg have been identified from canarium nuts, okra leaves, and soil samples, with high β-coefficients at 570-650, 770-790 and 860-1000 nm [8,65,66]. We found high β-coefficients at 690 and 930 nm when predicting B concentrations from either flesh or skin images. Similar spectral regions are also important in predicting B levels in whole-plant legume samples [60]. Inorganic materials such as Ca or B may not be spectrally active, but prediction is possible when inorganic materials bind with molecules, often organic complexes, that have covalent bonds such as N-H, S-H, O-H, C-H, C-O or C=C [7,58]. Therefore, B and Ca concentrations can still be predicted indirectly using hyperspectral imaging.
Hyperspectral imaging successfully predicted parameters that affect avocado postharvest processing. A high ratio of oleic to linoleic acid or high Ca concentration slows ripening, and prolongs shelf-life, while a high B concentration accelerates ripening and, thus, shortens shelf-life [12,19]. Up to 25% of avocado fruit in developed countries and up to 50% of avocado fruit in developing countries are lost during postharvest processing [67,68]. Market flexibility could be increased and waste reduced if shelf life of individual fruit could be estimated rapidly and non-destructively, allowing fruit to be sorted into homogeneous postharvest classes. Hyperspectral imaging also successfully predicted the ratio of unsaturated to saturated acid from both flesh and skin images. This ratio has important implications for human health because a diet rich in unsaturated fatty acids decreases LDL-cholesterol levels and other cardiovascular risk factors [27,69,70].

Conclusions
Our study has shown that hyperspectral imaging of avocado flesh and skin is a useful tool for predicting internal fruit quality. Flesh images could be used to predict palmitic, palmitoleic and linoleic acid abundance, unsaturated to saturated fatty acid (UFA:SFA) and oleic to linoleic acid (O:L) ratios, and the concentrations of C, Al, B, Ca, Cu, Fe, K, Mg, P, S and Zn. Most of these internal fruit parameters can also be assessed by imaging the skin, which allows non-destructive assessment of internal quality. Non-destructive assessment of, for example, Ca through hyperspectral imaging thus represents a promising tool for predicting quality parameters that influence the postharvest and nutritional properties of avocado fruit. Predicting postharvest properties of individual fruit such as shelf life has the potential to help reduce food waste by allowing fruit to be sorted into homogenous classes. This study also provided a proof of concept for potential use of hyperspectral imaging in fruit and vegetables with thick skin (e.g., citrus). Nonetheless, new methods such as alternative machine learning algorithms should be investigated in future studies, as they may hold the potential to improve prediction accuracy of developed models.