Full text
Knowledge-Based Systems 254 (2022) 109644 Contents lists available at ScienceDirect Knowledge-Based Systems journal homepage: www.elsevier.com/locate/knosys DIAFAN-TL: An instance weighting-based transfer learning algorithm with application to phenology forecasting M.A. Molina-Cabanillasa, M.J. Jiménez-Navarrob, R. Arjonaa, F. Martínez-Álvarezb, G. Asencio-Cortésb,∗ aeasytosee AgTech S.L., Diego Martínez Barrio 10 (3rd floor), ES-41013 Seville, Spain bData Science & Big Data Lab, Universidad Pablo de Olavide, ES-41013 Seville, Spain article info Article history: Received 20 December 2021 Received in revised form 26 July 2022 Accepted 5 August 2022 Available online 10 August 2022 Keywords: Transfer learning Phenology Time series forecasting Supervised learning abstract The agricultural sector has been, and still is, the most important economic sector in many countries. Due to advances in technology, the amount and variety of available data have been increasing over the years. However, compared to other economic sectors, there is not always enough quality data for one particular domain (crops, plantations, plots) to obtain acceptable forecasting results with machine learning algorithms. In this context, transfer learning can help extract knowledge from different but related domains with enough data to transfer it to a target domain with scarce data. This process can overcome forecasting accuracy compared to training models uniquely with data from the target domain. In this work, a novel instance weighting-based transfer learning algorithm is proposed and applied to the phenology forecasting problem. A new metric named DIAFAN is proposed to weight samples from different source domains according to their relationship with the target domain, promoting the diversity of the information and avoiding inconsistent samples. Additionally, a set of validation schemes is specifically designed to ensure fair comparisons in terms of data volume with other benchmark transfer learning algorithms. The proposed algorithm, DIAFAN-TL, is tested with a proposed dataset of 16 plots of olive groves from different places, including information fusion from satellite images, meteorological stations and human field sampling of crop phenology. DIAFAN-TL achieves a remarkable improvement with respect to 15 other well-known transfer learning algorithms and three nontransfer learning scenarios. Finally, several performance analyses according to the different phenological states, prediction horizons and source domains are also performed. ©2022 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). 1. Introduction The agricultural sector has been presented as one of the most important economic sectors, as it has provided the basic livelihoods of the population throughout history. In recent years, due to a growing world population, increased crop security and climate change, monitoring, as well as introducing new technologies in this sector have become essential. These new technologies make it possible to monitor the current state of crops, providing valuable information to help farmers in their decision-making. Among all the parameters that can be monitored, we find the phenological stages of the crop to be one of the most important. Precision monitoring of phenological stages over time is essential to understand the impact of climate change on plants. Recent ∗Corresponding author. E-mail addresses: [email protected] (M.A. Molina-Cabanillas), [email protected] (M.J. Jiménez-Navarro), [email protected] (R. Arjona), [email protected] (F. Martínez-Álvarez), [email protected] (G. Asencio-Cortés). studies show the reaction of such changes throughout the timing of phenological stages, thus affecting crop productivity [1]. Moreover, if such monitoring is combined with the prediction or forecasting of these phenological stages through the application of artificial intelligence algorithms, it becomes a useful tool for small and large farmers for planning irrigation schedules, pesticide and disease control and fertilization management [2]. However, although all the new technologies developed are positioned as fundamental tools to help farmers make decisions, their implementations in the agricultural sector have been stagnant for several years. However, in recent years, there has been a greater interest in their applications, especially by large companies that are accessing the agricultural sector and require a greater cost and farm management control. This incipient data collection means that a sufficiently large historical database is not yet available to be effectively used to train machine learning-based models. New techniques capable of extracting relevant knowledge from low available data are essential, especially in geographies where such data are scarce. Moreover, those techniques should produce general models able https://doi.org/10.1016/j.knosys.2022.109644 0950-7051/©2022 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 to accurately predict the evolution of phenology in different crops. For this reason, data with diversity, in terms of both input features and label spaces, must be provided as training for such models. In this context, the transfer learning paradigm has proven to be as an effective way to capture diverse patterns from different problems (domains) and use them together to improve the prediction accuracy on a target domain. In this study of phenology forecasting it is assumed that each domain represents a crop of olive grove in a different place. Phenology forecasting is an especially complex problem due to the relationships among the large number of different factors that can affect crop evolution. For this reason, a vast number of variables taken from different sensors and places could be needed to extract the complex patterns that can explain the phenology evolution and, consequently, produce accurate forecasting models. In general, time series forecasting models that are based on machine learning algorithms use input training sets with lagged values of the time series as features and future ahead values as the different classes to predict the regression. Such data preprocessing is simple and effective in many cases, but some relationships among time series values cannot be captured by machine learning algorithms. For example, complex relationships between averages of values in different windows of the time series, are especially present in agronomics problems. Averaging very old values of some variables of the time series could be useful as input features along with more detailed recent values. Usually, many transfer learning proposals for supervised learning published in the literature are validated including a comparison of those proposals with nontransfer learning strategies using the same datasets [3]. However, this type of comparison is unfair and it does not reflect whether the performance improvement of a transfer learning algorithm occurs due to the nature of the algorithm of the higher volume of data it receives as training, compared to the lower volume given to the nontransfer learners. Specifically, transfer learning algorithms receive as training one or more source domains as training along with a training part of the target domain (assuming a single-target approach). However, there are usually two nontransfer learning strategies: (1) The first strategy includes a base learner trained with a source domain and tested with a subset of the target domain. (2) The second strategy includes a base learner trained with a subset of the target domain and tested with the rest of samples. Comparing a transfer learning algorithm with both strategies is unfair, because the volume sizes are always different and such a difference could be considerably large (especially in the second nontransfer learning strategy). To solve the problems previously described, a new transfer learning algorithm, DIAFAN-TL, is proposed and applied to phenology forecasting in several crops of olive groves. DIAFAN-TL is an instance weighting-based algorithm that weights each sample from multiple source domains in such a way that favors information diversity and penalizes false neighbors. The dataset to train and test the algorithm was specifically collected and prepared for this work, integrating an information fusion of satellite images, meteorological stations and human field sampling of phenology from olive grove crops. Moreover, vast feature engineering for the time series was performed, including variables that were not lagged but averages, maximums, minimums, sums, dispersions and value changes for different window sizes and temporary displacements. To validate the proposal, a fair comparison with 15 other well-known transfer learning algorithms and three nontransfer learning strategies using the same volume of training data for all the algorithms was performed. The aim was to isolate the cause of the performance improvement to the nature of the algorithm, as explained before. Moreover, several performance analyses according to the different phenological states, prediction horizons and source domains were also performed. The rest of the paper is structured as follows: Section 2 overviews recent and relevant papers in the field of transfer learning, as well as its application to phenology forecasting. Section 3describes the proposed methodology and how it is applied to predict a phenology time series. Section 4reports and discusses the results achieved from the different experiments that have been carried out. Finally, Section 5summarizes the conclusions. 2. Related works Transfer learning is becoming one of the fields of research where most of effort is being put [4]. In fact, many applications can now be found in the literature. Within the possible classifications and configurations of transfer learning, we can find domain adaptation, unsupervised learning and even fine-tune. Unsupervised learning is the case of abundant labeled source data and no labeled target data. In fact, [5] refers to inductive transfer learning as the case of having available labeled target domain data, transductive transfer learning as the case of having labeled source and no labeled target domain data, and unsupervised transfer learning as the case of having no labeled source and no labeled target domain data. A Unsupervised transfer learning method that mitigates nontransferable prior-knowledge by self-supervision can be seen in [6] Fine tune transfer learning enables to start with a model, pretrained for a specific task, and then fine-tune (train) only certain layers of the neural network for a related but different target task. However, the selection of fine-tunable layers is one of the major problems of such an approach. In [7] a new method for the selection of fine-tunable layers for a target dataset under the given constraints is described. Domain adaptation, which is particularly interesting in the context of this paper since instance weighing is used as a technique included in this area, is the process of adapting one or more source domains for the means of transferring information to improve the performance of a target learner. The domain adaptation process attempts to alter a source domain in an attempt to bring the distribution of the source closer to that of the target. Exploring into instance weighting approaches, included in the domain adaptation configuration, many studies have been developed, most of them refers to inductive transfer learning. For example, in [8], these techniques are applied to model, analyze and detect reference points of faces. The importance of applying transfer by weighing instances during learning is emphasized over its application afterward to adjust the models. In [9], two methods for regression based on importance weighting are presented, where, for each instance of the domain data, a weight is assigned such that the data contributes positively to the prediction of the target data. Additionally, in [10], a new metric based on weighted instances is used to measure the similarity between two domains using common spatial patterns to reduce the amount of training data that needs to be collected at the beginning of each session to calibrate the parameters of brain–computer interfaces. Further advances and an extended version of these techniques are used in other fields, especially in image processing. Furthermore, the technique itself has been studied in some recent articles due to the benefits it presents [4,5,11]. Other works applying these transfer learning and deep transfer learning techniques can be found in Refs. [12,13]. In [13], a domain adaptation extreme learning machine (DAELM) was developed to establish a simple soft sensor model suitable for multigrade processes with limited labeled data, inspired by the 2
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 idea of transfer learning. In [12], a novel framework of an adversarial transfer learning (ATL)-based soft sensing method was designed for the quality inference of multigrade processes. By treating each grade as a domain, the concept of ATL was adopted to learn a suitable feature transformation between different domains, which reduced the data distribution discrepancy and enriched the information provided by the target domain containing limited labeled data. Distance studies have been developed in works with deep transfer learning techniques and they have achieved remarkable results with reference to the effects of dataset similarity. Thus, in [14] some time series were classified using a distance based approach. All the techniques applied in the works in the previous paragraphs were gradually being extended to the agricultural sector, making up most of the information generated in recent years. These techniques were not yet widespread in the agricultural sector. Only some papers introducing these techniques in this sector can be found in the literature, such as the one described in [15] where basic algorithms were used for yield prediction, disease detection or crop quality. In this kind of study, satellite images play a key role. In recent years, satellite observations have been widely used in research work requiring difficult to obtain field data, due to their public accessibility and low cost, covering a large area with increasingly accurate resolutions [16–20]. Hence, time series of the MODIS NDVI index were used to distinguish different crop types according to their phenological evolution in [21]. Even in [22], these images were used to detect the optimal conditions for a given crop type and sowing areas, being able to distinguish each one before harvest. Another work that also used the MODIS satellite (and the corresponding NDVI index) to perform a spatiotemporal analysis of crop phenology in a given area can be found in Ref. [23] which aimed to classify crop types. A similar study can be found in Ref. [24]. Other early works published in the agricultural sector that apply new machine learning techniques, including deep learning and transfer learning can be found in Refs. [25–28]. In [27] deep learning techniques are applied to detect phenological stages of the rice crop through images taken by air vehicles to estimate of production and harvest dates. Additionally, in [29,30], some works can be seen using deep learning for the recognition of phenological patterns or for the prediction of the phenology and incidence of pests and diseases in crops. Especially in Ref. [29] the data taken for the analysis comes from half-hourly captures from cameras mounted on agronomic stations. Phenological patterns of crop growth are similar in different parts of the world. This makes it possible to apply models trained in some areas to others. In fact, [31] proposed a method of crop identification with LANDSAT satellite images (with a better resolution than MODIS) and the NDVI index, while the authors in [32] identified the phenological differences between different crops. Another work that has also used satellite imagery to apply deep transfer learning techniques for yield prediction is described in Ref. [33]. It predicts the yield of soybean crops in Argentina and uses this information to predict these crops in Brazil, due to the limited availability of data in this country. Transfer learning techniques have also been applied to the agricultural sector for crop type detection in different regions with limited access [28]. Fuzzy-based approaches can be found in the literature in the transfer learning context too. Hence, in [34] a fuzzy system with knowledge-leverage capability is proposed in order to solve problems where the available data from that scene are insufficient. In [35] Transfer learning is introduced for recognition of epileptic electroencephalogram signals. In [36] a new feature transformation method is developed with fuzzy systems. In [37] the concept of transfer learning is applied to prototype-based fuzzy clustering. Finally, in [38], the most recent advances in deep transfer learning are presented. Finally, more advanced techniques, such as image-based deep transfer learning, have been used for disease detection in crops, as can be read in Ref. [25]. Papers explaining how transfer learning techniques work can be found in Refs. [26,39]. 3. Methodology The goal of the methodology is to create an end-to-end validation framework that ensures the benefits of using transfer learning in a machine learning task starting from some data sources as input and a set of metrics as output. Moreover, a novel method in the field of transfer learning is assessed by means of such a validation framework. This section is structured as follows. Section 3.1 formulates the problem. Section 3.2 describes the data sources obtained in the application studied in this paper. Section 3.3 describes the preprocessing functions applied to the data obtained. Section 3.4 describes the data engineering step where expert knowledge is used to create features. Section 3.5 describes the validation framework divided into different schemes to make a fair comparison. Section 3.6 describes some background of the transfer learning area that this paper is focused on. Section 3.7 shows the training process of the proposed method. 3.1. Problem formulation Before diving into details of mentioned techniques, let us first provide a definition of transfer learning. Let DS={(x(i) S,y(i) S)}L i=1 denote a data set from a source domain DS={XS,pS(x)}and source task TS={YS,pS(y|x)}, where x(z) SϵXS,y(z) SϵYS,XS is the input space, YSis the output space, pS(x) is the marginal probability distribution and pS(y|x) is the posterior probability distribution. Similarly, let us define the target data, domain and task as follows: DT={(x(i) T,y(i) T)}M i=1,DT={XT,pT(x)}and TT= {YT,pT(y|x)}. If there is more than one source domains, we have a multi source problem. In this case, let us denote a multi source domain DSi={XS,pS(x)}N i=1and source task TSi={YS,pS(y|x)}N i=1, where each domain is defined as described above. The goal of transfer learning is to use the knowledge learnt from the source/s to improve the predictive performance of a predictive model fT(x):X→Yfor the target, despite the fact that the source and target tasks and domains may differ. The case under study is collected in the category of inductive transfer learning, where the label information of the target domain instances is available. Inductive transfer learning approaches transfer knowledge between different tasks (e.g. TS= TT) while DS=DTor DS= DT. The general methodology is illustrated in Fig. 1, showing the diagram with all steps to make predictions. Subsequent sections are devoted to explain every step involved in such general flowchart. 3.2. Data acquisition The first step is data acquisition, where different data sources are joined by time to generate the dataset. The data sources used in this paper are: 3
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 Fig. 1. Flowchart for the proposed methodology. Table 1 Sentinel bands used from satellite images. Band number Band description Wavelength range (nm) Resolution (m) B1 Coastal aerosol 433–453 60 B2 Blue 458–523 10 B3 Green 543–578 10 B4 Red 650–680 10 B5 Red-edge 1 698–713 20 B6 Red-edge 2 733–748 20 B7 Red-edge 773–793 20 B8 Near infrared (NIR) 785–900 10 B8A Near infrared narrow (NIRn) 855–875 20 B9 Water vapor 935–955 60 B10 Shortwave infrared/Cirus 1360–1390 60 B11 Shortwave infrared 1 (SWIR1) 1565–1655 20 B12 Shortwave infrared 2 (SWIR 2) 2100–2280 20 1. The first dataset is the satellite data. The dataset is taken from Sentinel, with historical data since 2015, 5 day periodicity and up to 12 bands with different wavelengths (see Table 1). 2. The second dataset is the meteorological data. Different meteorological stations measure different variables, such as temperature, humidity, solar radiation and precipitation. These stations have a daily sampling periodicity. 3. The third dataset is the field sampling data. This is the target to forecast in this work. It consists of the phenology sampling obtained by experts of crops. The phenology usually consists of a set of states for which the crop evolves over time. Such data are usually collected on a weekly basis in this work. In this work, the same data sources are obtained from different plots where phenology has been sampled from their crops. Each plot is considered a different domain as each plot demonstrates different behavior for the same task. With the data obtained, a different dataset is constructed for each domain and plot with a feature for each variable of each data source obtained. The dataset constructed is called the event table and is the starting point of the entire process. 3.3. Data preprocessing Field sampling data for each domain is collected on a weekly basis. As the data depends on the attendance of a technician at the plot to collect the information, it is possible that there are some weeks without available data. A simple strategy is followed to impute data. We let Ptbe the phenology value observed at time t. If subsequent phenology values Pt+1,...,Pt+n(n≥1) has an unknown value, Pt+n+1 has the same value as Pt, and the phenologies Pt+1,...,Pt+nare imputed with the value of Pt. 4
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 3.4. Feature engineering Feature engineering is the process of using domain knowledge to extract features from raw data. These features can be used to improve the performance of machine learning algorithms. To this end, the following functions have been carried out for each feature: 1. The first function is for window size definition. This refers to the definition of the time intervals used to calculate different statistical functions. 2. The second function is the statistic function definition. This is the definition of the statistical functions to be applied to each of the variables in these time windows. The statistical functions used in this work are: means, accumulates, maximums and minimums, and they are calculated between the values of a variable in a temporal space. 3. The third function is for relevant events. These are the values of the series that exceed some thresholds are marked as relevant events. Those events are used as the beginning or end for further window calculation. 4. The fourth function id for target variables. These are the variables that are used for prediction. In this case, the phenological state is predicted in the following four weeks after the prediction date. In that way, averages of temperature or precipitation accumulations in windows to the past in the short, medium and long term are calculated. Other extreme conditions are also considered into account when defining these features, e.g., extreme temperature thresholds or extreme rainfall. 3.5. Validation schemes To compare the improvements obtained by applying transfer learning techniques with traditional techniques, a validation framework composed of different schemes is built. This framework arises from the need to make fair comparisons in an imbalanced data context from different domains. The goal of these schemes is to ensure the benefits of using transfer learning in different scenarios balancing the data and ensuring that the comparisons are fair enough to make conclusions. The validation schemes are applied to our method and traditional algorithms extracted from the literature as a baseline. These algorithms are shown in the comparative tables in Section 4. The taxonomy of the different validation schemes has two main branches: no transfer learning and transfer learning. The no transfer learning includes all the techniques that do not apply any transfer learning and consider the data from different domains to be the same. The transfer learning branch uses several techniques that consider the different domains and apply adaptation from the sources and domains to the target domain. Moreover, these two branches are divided into reduced data (if we limit the source data) and full data (if we use all the data available from the sources). The no transfer learning scheme is described below: 1. Reduced data (a) We described the reduced data for the target only. In this case, only data from the target domain are used for validation. This is the most basic scheme reflecting cases where very limited historical data is available. Using random forest (RF) and logistic regression (LR) as the base algorithms, the last year of the target domain is taken as the test and the penultimate year as training. (b) We described the reduced data for sources + targets. In this experiment, we study the influence of the source domains for predicting the test set by linking the training sets. For this purpose, we take all the years of the target domain except the last one and all the years of the source domains (domain by domain) except the last ones for the training set. The last year of the target domain is again left as the test set. 2. Full data. For this experiment, all years from all the source domains and the target domain except for their last years are used. Using RF and LR as the base algorithms, the last year of the target domain is taken as the test and the rest of the years are used for the training. Analogously, the transfer learning scheme, based on RF and LR is detailed below: 1. The reduced data can divided into one source or random sources: (a) When the reduced data is considered one source, in this experiment, each source domain is taken as a separate source. For each iteration, the following steps are followed: i. The model was trained with all years of the source domain except the last two years. ii. We retrain the model with the penultimate year of the target domain. iii. It is tested with the last year of the target domain. (b) When the reduced data is divided into random sources, the same methodology is followed as in the previous experiment but each year of the training set might belong to a different source domain and this experiment is repeated n times. 2. The full data in this experiment is intended to prove that transfer learning improves the simple union of all the information provided by the source sets. For this purpose, we train with all the source domains except for those from their last year. Subsequently, it is retrained with all the years of the target set except the last one. Again, the last year is left as the test set. 3.6. Proposed method In this paper, a novel instance weighting transfer learning method has been developed based on the use of a specific metric named DIAFAN that provides diverse information and penalizes false neighbors in training sets. Instance weighting is a subfield in transfer learning whose objective is, during the training step, to assign a weight to the instances from the sources and domains to learn more from the most informative examples and prove the final results. In the literature, these weights are usually assigned by a distance function, such as log-likelihood or cosine. In our method, a Siamese network was trained to estimate the distance function between instances from different domains [40]. The next section describes the complete training process used in this method. 3.7. Training process To calculate the DIAFAN metric it is necessary to have the data of all the domains: the target and all the sources. The procedure consists in weighting the instances of the source domains by their similarity in attributes and classes with the instances of the target 5
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 Fig. 2. The training and test phases of the proposed transfer learning methodology to assign weights to instances from source domains. domain, so that the preprocessing of assigning weights to the instances of the source domains is done jointly with the target domain. Then, the data of all the training samples of the target set are taken and the weighted instances of the source domains are added. Finally, a single model is trained with all the data: target domain and source domains together. The DIAFAN metric can be included in contrastive algorithms. Contrastive learning, in general, learns a distance function but there are cases in which this function is already given, and this is the case in which the DIAFAN metric is included. With respect to algorithms in which a distance function is learned, the advantage of the DIAFAN metric is that it does not fit a black box, where the weights are iteratively adjusted during the learning process. The DIAFAN metric is based on prior similarities between attributes and classes and does not rely on the number of iterations to adjust it. This helps in the greater efficiency of DIAFAN in the case of problems with model re-training since there is no need to re-train to re-obtain the weights with consequent time savings. If new domains are included, it is only necessary to calculate the metric for them and not for the previous ones. In addition, with DIAFAN less weight is given to instances of false neighbors by identifying such cases. Also in our case, the weights are more interpretable than mathematically learned weights. The training process of our method consists of calculating a weight for each sample from source domains and building a model generated by a base classifier using weighted instances from source domains along with the training part of the target domain with a fixed weight of 1. First, a weight (wC j) is assigned to each instance from each source domain. This weight is assigned based on the similarity, assessed by a Euclidean distance, among the hfuture phenology values of such instances and each instance of the target domain. Second, for each pair of instances, the cosine distance between attributes is also calculated, from which we will obtain another weight (wA j). With both weights, a final weight is calculated. This distance is named DIAFAN, which stands for DIversity Avoiding FAlse Neighbor. It is defined in Eq. (1). DIAFAN Weight =√(S−1)2+A2 √2(1) In Eq. (1),Srepresents the weight that measures the similarity between classes and Arepresents the weight given by the cosine distance function between attributes. For DIAFAN ranges between [0,1], the extreme scenarios are described as follows: 1. S=0 and A=0. In this case, we have the minimum distances between both classes and attributes; thus, they seem very similar to each other. It is therefore given a weight 1 √2in order to favor the third point. 2. S=1 and A=0. In this case, the classes are not very similar and the attributes are very much alike. A weight of 0 is given so as not to introduce false neighbors. 3. S=0 and A=1. In this case, the attributes are very similar, and the classes are very similar. This case brings variability and is given a weight of 1. 4. S=1 and A=1. When everything has little resemblance, it is given a weight, 1 √2as this is a good example to transfer knowledge. 6
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 Fig. 3. Geographic location of the 16 parcels for the proposed study of transfer learning (Andalusia, Spain). Fig. 4. More detailed view of plots for each region. Finally, the pair of instances and the newly calculated weight feed the base algorithm (RF and LR). The base algorithm uses the weights calculated by the DIAFAN weight for the sources and domains training set and a value of Wk=1 for the target domain training instances. The model is trained considering these weights and then, once trained, tested with the test dataset. Fig. 2 shows the complete pipeline followed to train and test the model. Finally, in the prediction phase, the test part of the target domain is passed to the previously adjusted model, obtaining a prediction for the four weeks after the prediction date (Fig. 2). 3.8. Transfer learning benchmark algorithms To compare the effectiveness of our proposed method, we selected a list of previously published well-known algorithms of transfer learning. These algorithms are briefly described below: •STRUT [41]. This algorithm adapts a decision tree trained on the source samples to the target samples by discarding all numeric threshold values in the tree and working top-down, selecting new thresholds using the target examples. 7
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 Fig. 5. Geographic distance between domains (plots) (in km). Table 2 Characteristics of the 16 domains (plots) used in the study. Code Plot name Region Coordinates Altitude Surface Slope Dry/Irrigated Density Main variety P01 C1_Algodonales1 Cádiz 36.86,−5.43 360 8,54 19 Dry 58 Lechín, Zorzaleño, Ecijano P02 C1_Algodonales2 Cádiz 36.87,−5.45 770 2,26 19 Dry 138 Lechín, Zorzaleño, Ecijano P03 C1_Olvera1 Cádiz 36.94,−5.25 350 1,04 5 Dry 134 Picual/Marteño P04 C1_Olvera2 Cádiz 36.94,−5.30 425 3,1 11 Dry 74 Lechín P05 C2_LosCorrales Sevilla 37.05,−5.01 600 1,93 15 Dry 119 Picual/Marteño P06 C2_ElSaucejo1 Sevilla 37.10,−5.04 460 31,59 15 Irrigated 156 Manzanillo P07 C2_ElSaucejo2 Sevilla 37.05,−5.08 520 1,78 20 Dry 120 Hojiblanco P08 C2_ElSaucejo3 Sevilla 37.07,−5.06 510 2,87 25 Dry 150 Hojiblanco P09 C3_Baena Córdoba 37.67,−4.33 300 42,53 3 Irrigated 154 Picual/Marteño P10 C3_NuevaCarteya Córdoba 37.60,−4.42 460 9,58 9 Dry 76 Picual/Picudo P11 C3_Aguilar Córdoba 37.44,−4.69 280 6,3 1 Dry 194 Picual/Marteño P12 C3_PuenteGenil Córdoba 37.44,−4.71 320 19,52 1 Irrigated 208 Manzanillo P13 C4_PozoAlcon1 Jaén 37.71,−2.96 700 6,015 2 Irrigated 178 Picual P14 C4_PozoAlcon2 Jaén 37.68,−2.94 700 2,86 5 Irrigated 200 Picual/Marteño P15 C4_PozoAlcon3 Jaén 37.66,−2.93 700 1,09 1 Irrigated 140 Picual/Marteño P16 C4_PozoAlcon4 Jaén 37.67,−2.91 700 0,96 3 Irrigated 92 Picual •SER [41]. This algorithm pairs two local transformations of a decision tree structure. It first specializes rules induced over the source data to the target data (expansion) and then generalizes rules induced over the source data by pruning (reduction). •MIX [42]. This algorithm generates two forests using both SER and STRUT, and then it defines MIX as a majority voting ensemble whose underlying model is the union of all the trees. in these forests. •TreesMixedEntropy [41]. Tree construction is done via shared information gain (IG). The final IG is calculated using a weighted mixture of IGs of each training set. •NaiveBiasRegularizator [41]. The weights in the original forest are changed from a uniform distribution to one, which favors trees with lower error rates on the available target training samples. •NaivePrunningTree [41]. This algorithm constructs a treebased algorithm using the source domain and then uses the target domain to perform pruning on the original forest. •NaiveRelabelingTree [41]. This algorithm updates the leaves of a forest trained on the source examples using the target samples. •CORAL [43]. This algorithm minimizes domain shift by aligning the second-order statistics of source and target distributions without requiring any target labels. •KMM [44]. This algorithm resolves the estimation problem of the above unknown ratios by matching the means between the source-domain and the target-domain instances in a reproducing kernel Hilbert space (RKHS). •TCA [45]. This algorithm learns a linear mapping from an empirical kernel feature space to a low-dimensional feature space using the maximum mean discrepancy (MMD). •ConsensusRegularization [46]. This algorithm exploits the distribution differences and learns the knowledge among training data from multiple source domains to boost the learning performance in a target domain. For that purpose, a local classifier is trained at each source domain by considering both local data and the prediction consensus with the classifiers from other source domains. 8
M.A. Molina-Cabanillas, M.J. Jiménez-Navarro, R. Arjona et al. Knowledge-Based Systems 254 (2022) 109644 Table 3 Accuracy, recall, precision and F-measure of methods obtained from the state of the art and the developed DIAFAN-TL method. Base Transfer Acc Recall Prec F1 None STRUT 74.69% 48.65% 45.89% 47.23% SER 72.22% 45.90% 44.54% 45.21% MIX 73.53% 47.48% 44.61% 46.00% TreesMixedEntropy 74.54% 48.10% 46.18% 47.12% NaiveBiasRegularizator 59.50% 28.21% 21.51% 24.41% NaivePruningTree 79.69% 47.39% 46.63% 47.01% NaiveRelabelingTree 78.13% 45.80% 45.45% 45.62% LR (Only Target reduced - no TL) 68.63% 43.82% 42.68% 43.24% (Only Target full data - no TL) 73.50% 55.62% 47.00% 50.95% (Source + Target reduced data - no TL) 75.18% 58.62% 49.19% 53.49% CORAL 69.77% 48.22% 43.96% 45.99% TCA 47.12% 26.19% 26.91% 26.54% ConsensusRegularization 67.74% 41.37% 40.77% 41.07% FEDA 57.23% 34.09% 34.17% 34.13% TrBagg 63.41% 39.76% 38.29% 39.01% TrAdaBoost 59.68% 41.16% 36.46% 38.67% KMM 70.36% 48.31% 43.77% 45.93% KRR 77.81% 48.39% 47.34% 47.86% DIAFAN-TL 85.73% 69.82% 61.89% 65.62% RF (Only Target reduced - no TL) 78.44% 60.78% 46.74% 52.84% (Only Target full data - no TL) 87.25% 62.09% 61.10% 61.59% (Source + Target reduced data - no TL) 88.51% 63.47% 64.58% 64.02% CORAL 83.12% 54.91% 54.75% 54.83% TCA 52.51% 26.88% 33.48% 29.88% ConsensusRegularization 81.44% 47.82% 50.78% 49.26% FEDA 85.22% 53.56% 56.41% 54.95% TrBagg 85.28% 53.89% 54.37% 54.13% TrAdaBoost 86.40% 58.17% 58.10% 58.13% KMM 86.24% 57.24% 56.88% 57.06% KRR 79.25% 46.96% 47.78% 47.36% DIAFAN-TL 90.19% 67.76% 70.75% 69.22% •FEDA [47]. This algorithm spans the feature space to generate a more suitable feature space for source and target domains using three representations: source, target and shared. Then, the learning algorithm adapts using extra information. •TrBagg [48]. First, the algorithm generates many weak classifiers from target and source data. Then, these classifiers are filtered using target data making and the selected classifiers are used in the bagging ensemble. •TrAdaBoost [48]. This algorithm extends the AdaBoost to the transfer learning scenario. A new weighting mechanism is designed to reduce the impact of the distribution difference and is used in classical Adaboost joining the source and target data. •KRR [49]. This algorithm combines Ridge regression and classification (linear least squares with l2-norm regularization) with the kernel trick. It thus learns a linear function in the space induced by the respective kernel and the data. For non-linear kernels, this corresponds to a non-linear function in the original space. 4. Results 4.1. Datasets description The datasets used to test the proposed methodology were retrieved from three different sources. First, index and the band information (10 bands) was collected from the Sentinel [50] satellite images. This satellite has been capturing images since 2015, increasing the sampling rate over the years. Now, an image is captured every 4 or 5 days (from 15 days, on average, in 2015). From these images, different indices and the values of color bands are calculated for each pixel of the image. In this work, the mean value of the pixels of each band are used for each image to train the model. Second, the olive phenology states of each studied parcel were retrieved from the open dataset, property of ‘Red de Alerta e Información Fitosanitaria’ [51] belonging to ‘Junta de Andalucía’. Olive cultivation consists of 14 phenological stages, according to De Andr´ es scale [52]. To ensure clarity and reliability in the results, these 14 stages are reduced to 4 as follows: 1. Stage 1. The first stage consists of the first two phenological stages, corresponding to the Winter Bud and Moved Bud stages. 2. Stage 2. The second stage includes all stages of flowering (stages 3–8): Inflorescence, corolla, flowering and petal fall. 3. Stage 3. The third stage consists of all stages of fruit set and the hardening of the fruit (9–10): fruit set and stone hardening 4. Stage 4. The fourth stage includes all stages of the fruit set (11–14). These stages are in line with the official classification based on the BBCH scale [52]. Both scales converge to the 4 phases described above and are broadly grouped in the same way. This phenology dataset was obtained from sixteen parcels for four regions of Andalusia, Spain (four for each one), as can be observed in Fig. 3, with different characteristics among them, such as variety, altitude, type of crop (traditional, intensive or super-intensive), etc. A more detailed view of parcels for each region is shown in Fig. 4. The characteristics of these parcels are shown in Table 2. The main characteristics that represent each domain are the altitude (in meters), surface (in hectares), the slope (in %) and the density (trees per square meter). Fig. 5 shows a heatmap of the distances (in km) between the domains. 9