Introduction

Agroforestry is a sustainable land management system that intentionally combines woody perennials with agricultural crops and/or livestock on the same unit of land to create integrated and productive ecosystems1,2. By efficiently combining multiple species, agroforestry optimizes resource use such light, space, water and nutrient while delivering critical ecological services3,4. Agroforestry also stands as a pivotal strategy in the battle against climate change and the preservation of rural livelihoods. Its multifaceted benefits extend from strengthening climate resilience to enhancing carbon sequestration, biodiversity conservation, soil fertility, and water regulation1,5,6,7,8. Furthermore, agroforestry creates a range of employment opportunities and contributes to food security in rural environments6,9,10,11. Agroforestry is important in coastal areas such as India because of the environmental and socio-economic characteristics of the area. Coastal areas are diverse systems that support important economic and ecological functions. Nevertheless, these areas experience a number of challenges such as climate change, urbanization, pollution, deforestation, unregulated tourism and coastal erosion. Coastal agroforestry has been found to provide a multipurpose intervention that can address these problems through improving soil conservation, coastal protection, biological diversity, and income diversification12,13,14. Combining agroforestry with aquaculture, fisheries, and non-timber forest products provide prospects for prosperity of coastal societies and ensure ecosystem stability and climate change mitigation.

Arecanut (Areca catechu L.) based agroforestry systems are traditional homestead gardening practices commonly found along the west coast of India, particularly in the Konkan region. Locally known as “Kulagar”, this traditional system is inherited from their ancestors where arecanut is the primary crop, and the spaces between the arecanut trees are used to grow various fruit crops, spice crops, tuber crops, timber and vegetables15. This system is a muti-strata design characterized by irregular planting patterns than formal geometric arrangements16. The arecanut-based agroforestry system is the most common form of intercropping along the west coast of India16,17. This traditional developed agroforestry system prioritizes functional diversity and opportunistic space utilization over standard density protocol highlighting the adaptive utilization of available resources. Behera et al18. found that, this system is very important for enhancing the livelihood of small and marginal farmers of coastal region. Despite its importance, mapping agroforestry systems, especially traditional ones like arecanut based agroforestry in Goa, remains challenging. Conventional mapping methods are often manual, labour, and cost-intensive, making them ill-suited for large-scale mapping19,20,21. While remote sensing offers several advantages viz., rapid data collection over large area and inaccessible regions and cost effective22. This technology provides near real-time information, allowing for quicker analysis and more timely decisions. High resolution multispectral remote sensing data and object based image analysis was used to map Populus deltoides based agroforestry system23 and agroforestry area in western Himalayas of India24. Previous studies have also stated that agroforestry systems are complicated to map using remote sensing due to multi-strata, high agrobiodiversity and topographic conditions25,26. Conventional remote sensing methods such as pixel based classification or vegetation index thresholding (NDVI) fails to capture the agroforestry complexity and intricacies. This is where machine learning models with high-resolution remote sensing emerge as game-changers. Machine learning models are objective, fast, and accurate alternatives to traditional methods for mapping agroforestry systems because they automate feature extraction, capture complex patterns in high-resolution imagery, and allow for scalable mapping27,28,29,30. So, the utilization of machine learning models in remote sensing investigations has experienced substantial growth across multiple domains like mapping of land-use and land cover, landslides, floods and gully erosion31,32,33,34,35,36,37,38.

Technological advances in remote sensing and machine learning have contributed significantly in identifying, assessing and monitoring land use and land cover (LULC) dynamics. Geographic Information System (GIS)-supported multi-criteria evaluation (MCE) methods have been widely applied to assess agroforestry suitability. For example, Nath et al.39 applied MCE in the eastern Indian Himalayas to assess the potential of agroforestry. Ahmad et al. (2019) used GIS along with FAO guidelines to evaluate the agroforestry suitability taking into consideration the nutrient availability of soil, climate and topography. Similarly, Ahmad and Goparaju40 used remote sensing and GIS to map nutrient availability, and agroforestry suitability. Machine learning models, such as Random Forest (RF), have proven effective in creating accurate suitability maps41,42. Recent studies used RF, Support Vector Machine (SVM), and Artificial Neural Network (ANN) for above ground biomass estimation43,44,45. Machine models such as RF46,47, SVM48 and Gradient Boosting (GB)45,49 have been used with satellite data for tree species classification. Despite the extensive use of machine learning algorithms in the different domains (LULC mapping, biomass estimation, species classification) of remote sensing-based studies, their specific application for mapping traditional, multi-strata agroforestry systems, particularly mapping traditional arecanut based agroforestry system remains unexplored. This represents a critical knowledge gaps as existing techniques lack precision and scalability needed for effective decision making and conservation planning for these traditional systems. Based on these identified research gaps, this study hypothesizes that machine learning models with high-resolution remote sensing imageries can accurately map arecanut based traditional agroforestry systems in the coastal region of Goa, by effectively capturing their spectral and structural complexity. Based on this background, this study aims to compare various machine learning models for mapping arecanut based agroforestry systems in the coastal region of Goa, India, and to identify important remote sensing-derived variables capturing the spatial patterns of these systems.

Materials and methods

The study was carried out in the state of Goa, which lies in the central Western Ghats of India within the latitudes of 14°53ʹ N to 15°40ʹ N and longitudes of 73°40ʹ E to 74°21ʹ E, bordering the Arabian Sea (Fig. 1). The total reported area of Goa in this study is 3625.7 square kilometers. The research location is characterized by a subtropical climate. The annual mean minimum and maximum temperatures are 22.6 ℃ and 33.2 ℃, correspondingly with an annual mean precipitation of 3405 mm as recorded at ICAR-CCARI, Goa. Goa comprises two distinct physiographic regions: the Western Ghats and the coastal lowlands. The hilly areas have shallow, gravelly soils with slight to moderate acidity, while the coastal plains feature very deep, moderately to strongly acidic soils. These are classified as phosphorus- and aluminium-rich Inceptisols and sandy loam to sandy Entisols50. Goa’s predominant land uses include cashew (Anacardium occidentale) cultivation (55,732 ha), rice (Oryza sativa) fields (47,104 ha), coconut (Cocos nucifera) plantations (25,686 ha), pulses (7,890 ha), and areca nut (Areca catechu) groves (1,600 ha)16.

Fig. 1
Fig. 1
Full size image

Study area map depicting different land use classes in Goa, India.

This study used Sentinel-2 satellite data with 10 different spectral bands (B2, B3, B4, B5, B6, B7, B8A, B8, B11, B12) at a spatial resolution of 20 m. The individual spectral bands were utilized to calculate 28 spectral indices (Supplementary Table 1), which were selected based on field investigations and literature surveys. The median values of Sentinel-2 level 2 products available between October and December 2022, coinciding with ground truth collection having cloud cover of less than 10%, were downloaded using Google Earth Engine.

On the other hand, 70 agroforestry locations were identified as the dependent variable based on GPS-based field surveys (Supplementary Fig. 1) and secondary data (FSI). A total of 374 non-agroforestry locations (agriculture, bare area, forest, building, water bodies) were also identified through the field survey and high-resolution Google Earth images to train the model. The classification of agroforestry and non-agroforestry areas using machine learning models was performed using a 70:30 ratio for training (315) and testing (135) datasets, respectively (Fig. 1). The ‘createDataPartition()’ function from the caret package in R Software (Version: 7.0–1; URL link: https://cran.r-project.org/web/packages/caret/index.html) was used to split data into training and testing sets in a stratified way. This function ensures that the distribution of the response variable is maintained in both the training and testing splits especially for classification tasks.

Boruta algorithm

The selection of features (covariates) for the modelling process was conducted using the Boruta algorithm. The Boruta approach automates feature selection, especially in datasets with many potentially significant characteristics. Focusing on the most important variables reduces dimensionality and improves model interpretability and predictive performance. The methodology can be outlined as follows: (i) creating duplicate instances for all independent variables and introducing additional features to remove correlations with the output variable (referred as shadow features). (ii) Training the machine learning (ML) algorithm using the expanded dataset and computation of Z scores. (iii) Identifying variables whose Z-scores are greater than the maximum Z-score among the shadow attributes (MZSA)51,52.

Machine learning models

In the present study, three popular machine learning (ML) models, viz., RF, SVM, and GBM were utilized for agroforestry area mapping. RF is a widely utilized ensemble learning technique employed machine learning for both classification and regression applications53,54,55. It is classified as an ensemble approach as it utilizes many decision trees to construct a more robust and precise model. In the current study, RF was used to classify arecanut-based agroforestry with other land use classes using remote sensing-derived spectral bands and indices as predictors. The outputs from individual decision trees are combined by majority voting. The RF approach requires two user-defined parameters: mtry, which specifies the number of parameters selected at every split, and ntree, which specifies the number of trees.

The SVM is a supervised learning technique that operates on the premise of an optimum separation hyperplane56. SVM exhibit exceptional efficacy in high-dimensional spaces and possess great adaptability in managing several forms of data. The datasets are partitioned into distinct classes by this hyperplane. The present work utilized the radial basis function as a kernel function to convert the dataset33. GBM is a widely used machine learning algorithm that is useful for classification and regression problems. It constructs an ensemble of weak learners, usually decision trees, in a step-by-step fashion, with each subsequent learner rectifying the errors committed by its predecessor57. GBM is known for its high predictive accuracy and robustness in handling noisy data. ML model hyperparameters were optimized using 10-fold cross-validation with the RStoolbox package in R 4.0.2. The methodology is shown in Fig. 2.

To improve the performance, reliability and efficiency of the ML models the strategy of hyperparameter tuning is of great importance. The values of the hyperparameters in the models, namely, RF, SVM and GBM were tuned to improve the models’ performance. This tuning process was performed to get the best prediction of each model for the given dataset. The optimum hyperparmeter for RF were mtry = 38, splitrule = gini and mini.node.size = 1. For SVM optimum value of sigma was 0.0954 and ‘C’ was 1. For GBM model, the optimal number of trees was 150, interaction.depth was 3, shrinkage was 0.1 and n.minobsinnode was 10.

Fig. 2
Fig. 2
Full size image

Flow chart indicating procedure followed to prepare agroforestry maps.

Validation of the models

Statistical indices like accuracy and kappa were utilized in the current investigation to evaluate the implemented models. In machine learning, accuracy is a prevalent metric used to assess the efficacy of a classification model. It depicts the proportion of correctly predicted instances with the total number of instances within the dataset58.

$${\text{Accuracy}} = \frac{{{\text{Number}}\:{\text{of}}\:{\text{correct}}\:{\text{predictions}}}}{{{\text{Total}}\:{\text{number}}\:{\text{of}}\:{\text{predictions}}}}$$

Kappa is a statistical measure that assesses the level of agreement between the predictions made by a model and the outcomes that would occur by random chance. Higher Kappa values indicate better-than-chance agreement. Several scholars have emphasized the significance of the Kappa index in model validation55,59,60.

$${\text{Kappa}}\:{\text{coefficient}}\:\left( {\text{K}} \right) = \:\frac{{\varvec{\uptheta\:}}_{1}-{\varvec{\uptheta\:}}_{2}}{1-{\varvec{\uptheta\:}}_{2}}$$
$$\:{\varvec{\uptheta\:}}_{1}=\frac{\sum\:_{\mathbf{i}=\mathbf{j}=1}^{\mathbf{N}}{\mathbf{x}}_{\mathbf{i}\mathbf{j}}}{\mathbf{N}}$$
$$\:{\varvec{\uptheta\:}}_{2}=\frac{\sum\:_{\mathbf{i}=1}^{\mathbf{N}}{\mathbf{x}}_{\mathbf{i}+}{\mathbf{x}}_{+1}}{{\mathbf{N}}^{2}}$$

Where xij = number of counts in the ijth cell of the confusion matrix, N = total number of counts in the confusion matrix, xi + = marginal total of row i, and x + i = marginal total of column i.

User’s and producer’s accuracy

User’s accuracy, is determined by dividing the number of correctly classified pixels in a category by the total number of pixels assigned to that category (row total)61. This measure represents commission error and indicates the likelihood that a pixel classified into a specific category truly corresponds to that category in reality. Producer’s accuracy is calculated by dividing the correctly classified pixels for a category (from the main diagonal) by the total test pixels in that category (column total). This metric reflects how effectively the model classifies test pixels of a particular land cover type.

Variable importance

Variable importance plots (VIP) are crucial tools in machine learning as they provide valuable insights into the importance of various features in accurately predicting the target variable. These plots facilitate the identification of the most influential features on model predictions and can assist in feature selection, model interpretation, and gaining domain-specific insights. The variable importance for every model was calculated using ‘varImp’ function of ‘caret’ package in R Software (Version: 7.0–1; URL link: https://cran.r-project.org/web/packages/caret/index.html).

Results

Boruta algorithm

The feature selection process is an essential phase that eliminates completely irrelevant or redundant variables. The Boruta method did not find any of the variables to be redundant with all the 38 variables were confirmed as important (Fig. 3; Supplementary Table 2). Twenty variables had near equal importance (mean of importance between 5 and 10), seventeen variables between 10 and 15, and one variable had mean importance more than 15 (NDWI2 = 18.10). The NDWI2, B3, SLAVI, MCARI, and MNDWI were identified as 5 most important variables.

Fig. 3
Fig. 3
Full size image

Feature importance scores from the Boruta algorithm and their selection for modelling (shadow variables—mean, max, and min are shown in blue).

Comparison and validation of machine learning models

The present work utilized three widely-used machine learning methods, namely random forest (RF), support vector machine (SVM), and gradient boosting machine (GBM), to conduct agroforestry mapping. The cross-validation and validation performance metrics for three distinct machine-learning models are presented in Table 1. The GBM model demonstrated the highest accuracy and kappa values for both the cross-validation and validation datasets, indicating its better performance than other models. The GBM model had strong predictive performance as evidenced by its validation accuracy of 0.86 and kappa of 0.83. Although the RF model performed lower than the GBM model, it still obtained a validation accuracy of 0.84 and kappa of 0.81, indicating its strong capacity to generalize unseen data and retain predictive performance effectively. On the other hand, the accuracy of the SVM model was 0.82, and the kappa coefficient was 0.78, which did not surpass the results of the RF and GBM models.

Table 1 Performance of different machine learning models during cross-validation and validation.
Fig. 4
Fig. 4
Full size image

User’s and producer’s accuracy of machine learning model in agroforestry (AF) classification.

The three models performance in classifying agroforestry (AF) was assessed using user’s and producer’s accuracy (Fig. 4). The GBM model demonstrated a high user’s accuracy of 0.94 with only one sample of bare soil were inappropriately included in agroforestry. The Producer’s Accuracy for the AF class was 0.71, indicating that 71% of the actual AF instances were correctly identified by the model. However, five samples of forest and one sample of agriculture that should have been classified as agroforestry were omitted giving a moderate producer’s accuracy. In RF model, only one sample of forest was included in agroforestry demonstrating a higher user’s accuracy of 0.94. While in producer’s accuracy four samples of forest and one sample of agriculture were omitted from agroforestry class and a moderate accuracy of 0.76 was achieved.

In SVM model two sample of forest was wrongly included as agroforestry and with a user’s accuracy of 0.85. While ten samples of forest were inappropriately included in agroforestry leading to a low producer’s accuracy of 0.52. GBM and RF showed higher user’s accuracy (94%) indicating the models reliability in predicting AF. Confusion between AF and forest was the most prominent error across all the models, suggesting overlapping feature characteristics between these classes.

Variable importance plot

The predictor B4 was the most influential in RF, attaining a VIP score of 100 (Fig. 5). This indicated that band 4, which corresponds to near-infrared wavelengths, is an essential factor for mapping arecanut based agroforestry. It is well-established that near-infrared bands contain vital data regarding vegetation density and health, making them indispensable for remote sensing applications. Additional features, including NDWI2 (87.15), B5 (81.73), NBRI (71.55), and SLAVI (68.06) demonstrated considerable importance, thereby signifying their substantial contributions to the process of prediction. These characteristics probably encompass crucial elements such as vegetation, soil moisture content, and land cover, which are vital for mapping agroforestry.

In GBM, the most relevant predictor was NDWI2, with a VIP score of 100. This showed that water-related spectral indices affect the target variable. Following NDWI2, features such as NBRI (62.44), SLAVI (51.89), SATVI (47.66), and MNDWI (47.25) exhibited considerable importance, further emphasizing the influence of leaf area index and spectral characteristics on the prediction. The dominance of water-related indices such as NDWI2 indicates the significance of leaf water content in agroforestry. Vegetation indices like NBRI, SLAVI, and SATVI emphasized the importance of vegetation health or density in predicting the target variable, suggesting possible connections with agricultural productivity or ecosystem dynamics. In SVM, features such as NDWI2 (98.95), CLRE (98.84), NDREI2 (98.84), NDREI1 (98.60), and SLAVI (98.49) stand out as highly important predictors.

Fig. 5
Fig. 5
Full size image

Variable importance plot for GBM, RF, and SVM.

Agroforestry map and post-validation

The area under different land use categories in Goa, as analysed using three machine learning algorithms is presented in Table 2. The findings of this research demonstrated that the GBM model can generate a highly accurate probabilistic (0.86) agroforestry map (Table 1). Land use land cover map including Arecanut based agroforestry of Goa generated using the three ML model are displayed in Fig. 6. According to the GBM model the total area of arecanut based agroforestry systems are 58.6 km2. The second-best model was RF (0.84) that estimated an area of 53.4 km2 while the lowest area was estimated by SVM (23.2 km2). The average of these three machine learning models provides an estimated area of 45.1 km² under arecanut-based agroforestry in Goa. Using the best performing model i.e., GBM, area of applicability (AOA) analysis was performed. AOA is defined as the domain within which the model was developed based on acquired relationships, and where we presume that the assessed cross-validation performance is applicable62. The AOA is delineated based on dissimilarity index (DI) which evaluates the distance to the nearest training data point in the multidimensional predictor space for each prediction location.

The AOA is determined through a threshold applied to the calculated DI values to find pixels that differ significantly from reference samples. The threshold for the current study was 0.22. The results of AOA analysis revealed that the only 2.68% of the total geographic area of Goa was outside AOA where the predictions should be used cautiously or excluded due to significant differences in spatial predictor variables from training data (Fig. 7).

Table 2 Area under different land use in Goa based on three machine learning models.
Fig. 6
Fig. 6
Full size image

Land use land cover map including arecanut based agroforestry map of Goa using (a) RF, (b) SVM, (c) GBM.

Fig. 7
Fig. 7
Full size image

Area of applicability (AOA) for LULC mapping including Arecanut based agroforestry map of Goa using GBM.

Discussion

This study emphasized the significant role of machine learning techniques in agroforestry mapping. Machine learning techniques are used in this research due to their effectiveness in performing better than conventional methods63. The feature selection process is an important step in improving the robustness and interpretability of machine learning models. As noted by Hong et al. (2018)64, feature selection enhances model training, reduces complexity and leads to more accurate predictions. In this study, Boruta method identified all the variables as key features, emphasizing each features distinct contribution to the dataset. Notably, NDWI2, B3, SLAVI, MCARI, and MNDWI were identified as significant contributors. These indices help in understanding the vegetation water content, condition of the soil moisture and the surface water in details which are highly significant for monitoring crop status, drought conditions and forest fire risk assessment65,66. This demonstrates the importance of using diverse variables in machine learning models for agroforestry mapping and the effectiveness of advanced feature selection techniques.

Machine learning model testing is another critical step in the process of implementing these models as it offers a sound platform for enhancing performance in a specific domain of use55,59. The superior performance of the Gradient Boosting Machine (GBM) model can be attributed to its ability to capture complex, non-linear relationships through a tree-based boosting approach. This makes it ideal for use in agroforestry mapping because the method can identify interdependencies within data, which is generally diverse and complex45,49. The superior performance of GBM over RF for the classification of land covers is in line with Abera et al., (2022)67. Gradient Boosting Machines (GBMs) employ an iterative ensemble approach, utilizing decision trees as weak learners to enhance predictive accuracy57. Unlike parallel ensemble methods, GBMs sequentially add decision trees, with each new model specifically trained to minimize residuals from the previous iteration’s errors. This progressive correction mechanism allows GBMs to gradually improve overall prediction quality through additive model refinement67. This approach might help GBM in better mapping of agroforestry system compared to other models. The second-best model, RF was also useful in the mapping of agroforestry68. Singh et al. (2022) also used RF for site-specific agroforestry suitability mapping42. Moreover, Hayat et al. (2024) found that accuracy of RF is greater than that of SVM in predicting the suitability of land for agroforestry systems69. Earlier studies have reported that, RF models can effectively handle complex, non-linear patterns while maintaining robustness against noisy training data70,71 and has capability to discriminate spectrally identical categories72.

In the variable importance plot, NDWI2, which reflects vegetation water content73, emerged as one of the most critical features across all three models, highlighting the importance of water content indices in agroforestry mapping. Jiang et al. (2009) stated that NDWI is directly correlated with vegetation water content and serves as a predictor of canopy water content74. The index has been shown to correlate strongly with vegetation water content (VWC), facilitating the monitoring of water availability in diverse agricultural settings75. The arecanut-based agroforestry system requires consistent moisture for optimal growth which is ensured through regular irrigation in the study area. This steady water supply sets arecanut crops apart from other land uses that may not receive the same level of irrigation. Healthier plants exhibit distinct spectral signatures, which are effectively captured by water indices like NDWI2. Other significant features included vegetation-related indices (e.g., NBRI, SLAVI, MCARI, and MTCI) and spectral reflectance bands (e.g., B4 and B5), with minor variations observed among the models. These results suggested that a combination of water content indices, vegetation health parameters, and spectral reflectance characteristics is crucial for precise agroforestry mapping using machine learning algorithms76. Understanding the significance of these features can aid in the selection of input variables, enhancing the accuracy and interpretability of agroforestry mapping models, and promoting sustainable land management and environmental conservation.

The findings also showed that there were differences when the three classification techniques were used to estimate the extent of area under agroforestry. The estimated area under agroforestry by RF and GBM models was much higher than SVM. Classification is problematic with regard to agroforestry, which integrates aspects of both agriculture and forestry. RF and GBM are likely better at capturing this heterogeneity, reducing overfitting and capturing complex relationships77 which results in higher estimates of the area. SVM, on the other hand, is well suited to work with high-dimensional data78 but may have difficulties with the spectral and spatial features of agroforestry, which give rise to a lower accuracy of area computation. Model averaging or ensemble modelling is well recognized for enhancing the predictive accuracy and certainty as compared to individual models79,80,81. This method reduces the individual error of each model, combines their strengths and offsets their weaknesses thereby improving the accuracy of prediction82. Extensions of the present classification models based on hyperspectral remote sensing data can enhance the model performance and, thus may provide better understanding of agroforestry mapping.

Limitations

While the Boruta approach and subsequent machine learning model comparison offers valuable insights into agroforestry mapping, limitations exist. Uncertainties associated with land cover classifications arising from sensor variations and atmospheric conditions could bias the results. However, the findings may not have generalizability, as the context in which they are trained is specific to Goa and in their temporal scope. All three models struggled to effectively distinguish between AF and forest classes, suggesting it is difficult to define clear decision boundaries when classifying land cover types (tree-based systems) with similar spectral or spatial properties. The reliability and applicability of agroforestry mapping efforts should be improved by addressing these limitations. In future, leave location out cross-validation and forward feature selection methods can be tested to better results.

Conclusion

This work highlighted the potential of machine learning models for agroforestry mapping. Using the Boruta method for feature selection, NDWI2, B3, SLAVI, MCARI and MNDWI were found to be key indicators. These findings underscore the importance of integrating diverse remote sensing indices to improve the accuracy and interpretability for agroforestry mapping. Among the tested models, Gradient Boosting Machine (GBM) emerged as the most effective, demonstrating superior accuracy and robustness in capturing agroforestry’s inherent complexity. Random Forest (RF) also performed well, though less effective than GBM, while Support Vector Machine (SVM) faced challenges with spectral and spatial complexities, resulting in lower classification accuracy. Differences in area estimates among the models reflect the need for more advanced algorithms to address agroforestry’s heterogeneous characteristics. The outcomes of this study demonstrate that machine learning models, when properly tuned and combined with high-resolution remote sensing data, can serve as reliable tools for large-scale, accurate agroforestry mapping. Future work should investigate hyperspectral data along with ensemble methods in order to further refine model performance. This study makes an important contribution to the development of accurate agroforestry mapping techniques, which are needed for sustainable land management and environmental conservation promoting sustainable agriculture in coastal and ecologically sensitive regions.