# Research on Monitoring Topping Time of Cotton Based on AdaBoost+Decision Tree

Authors: Yibai Li; Guangqiao Cao; Chao Ji; Dong Liu; Jinlong Zhang; Liang Li; Cong Chen
Journal: Discrete Dynamics in Nature and Society
 (2022)

---

## Abstract

Topping is an important part in cotton field management, the spraying time has a great impact on cotton quality. In agricultural production, the strategy of timing the cotton topping mainly relies on manual inspections and experience, which is lack of efficiency and science. To solve the problem, this paper uses a drone equipped with a multispectral camera to collect the multispectral information of the cotton canopy of 12 days which includes before and after the topping operation in Shihezi. At the same time, the information of cotton plant height, the number of fruiting branches, and flower buds are collected. Compare multiple band combinations and vegetation index; the combined data of 550 + 730 + 790 nm band is selected as the model input. AdaBoost + decision tree method is proposed as a fitting model, the fitting results show that the coefficient of determination (R2) between multispectrum and cotton plant height is 0.96, and the average prediction error (RMSEP) is 0.40 cm, the coefficient of determination (R2) between multispectrum information and the fruiting branches is 0.97, the prediction mean error (RMSEP) is 0.54, and the correlation determination (R2) with the flower buds is 0.84, and the prediction mean error is (RMSEP) 0.49. The output data of the fitting model is used as the input of the topping time discriminant model, and the discriminant model can obtain an accuracy of 94.03%. The method in this paper can effectively monitor the growth status of cotton in the topping time and provide a technical path to scientifically determine the cotton topping time.


---

## Body

## 1. Introduction

Cotton is an important economic crop in China [1, 2], where Xinjiang is a major cotton production area with high mechanization in cotton production. Rapid and accurate monitoring of cotton growth status, precision management of cotton fields, and rational arrangement of production plans are essential to improve the production efficiency and yield of cotton in Xinjiang [3, 4]. The flower bud stage is one of the important growth periods of cotton [5, 6]. Cotton topping operation is a crucial operational task in the flower bud stage. Scientific topping and fertilization are conducive to promoting reasonable conversion of photosynthetic products and improving cotton yield and quality [7, 8]. The Technical Guidance on Mechanized Cotton Production in the Northwest Inland Cotton Growing Regions and related cotton planting agronomy regarding the requirements of cotton topping time issued by the Ministry of Agriculture and Rural Affairs of Peoples’ Republic of China stipulates that the appropriate topping time should be determined according to the factors such as cotton growth, plant height, and number of fruiting branches; early topping as appropriate based on promoting early maturity is preferred [9, 10]. Cotton topping is highly time sensitive, and the choice of operation time has a significant impact on cotton growth [6, 11, 12]. The determination of the operational strategy with unmanned aerial vehicle (UAV) or mechanical topping and the operating window period in path planning depend on the monitoring of crop growth conditions in the field [13, 14]. Therefore, rapid and accurate monitoring of cotton during the topping operation period can provide a data basis for scientific determination of topping time and strategic arrangement for topping operations [15, 16]. Currently, the cotton topping time is mainly determined based on manual field observation of crops and weather and soil conditions, and the topping time is judged empirically, which is inefficient in the information acquisition and lack of interpretability [11]. The indexes for determining cotton topping time mainly include plant height, number of fruiting branches, and number of flower buds [8]. There have been studies on the rapid acquisition of cotton plant height. However, rapid acquisition of information such as number of fruiting branches and flower buds is scarcely studied. Low-altitude UAV remote sensing has the advantages of high mobility, velocity and flexibility, low cost, and easy operation, with important application prospects in precision agriculture and agricultural production management [17–20]. Currently, research results have indicated that UAVs equipped with multispectral and hyperspectral cameras can be used to collect remote sensing information of cotton canopy [21–23], establish regression models, and monitor the plant height. However, there are a few studies to establish models for number of fruiting branches and number of flower buds in cotton flower bud stage.Common base regression models include multiple linear regression, support vector machine, neural network, decision tree, etc. [24–28]. Current studies mainly focus on the prediction of physiological indexes of cotton in single or multiple growth periods, with long data collection intervals, large gaps in plant growth status, and therefore low requirements for the feature extraction capacity of prediction models [29–31]. Due to the limited training parameters of the simple regression model, the model is prone to overfitting and the generalization ability is weak, resulting in low regression accuracy and model robustness. The morphological changes of cotton crops are relatively small in the period of the fixed period, so there are high requirements for the feature extraction and generalization ability of the regression model. Studies have shown [32] that the extracted features of each common base regression model can be complementary. Ensemble learning improves the feature extraction capacity of models by combining multiple common base regression models [33–35], which can be applied to multispectral information processing to improve the model prediction effect.In summary, this paper studies the following two questions: (1) cotton topping time is determined mainly based on manual observation of crop growth status, which is lack of interpretability and inefficient information acquisition. The use of UAV to collect multispectral information about crop growth can obtain information on the plant growth status quickly and efficiently. (2) To improve the disadvantage of weak robustness of common base regression models, ensemble learning is used to enhance the regression effect and provide a rapid crop data acquisition and processing method for the determination of cotton topping time.


## 2. Materials and Methods

### 2.1. Overview of Experimental Area and Materials

The experimental cotton variety in this paper is Xinluzao 68 (early maturing hybrid cotton variety). The data were collected from July 1, 2021, to July 12, 2021. The multispectral remote sensing information of cotton canopy, as well as crop growth indexed affecting the topping time and strategy, was collected continuously for 12 days before and after topping. Topping was performed in the experimental plot on July 8. Data were collected at the location of the 8th Division of Xinjiang Production and Construction Corps in Shihezi, Xinjiang, with an experimental plot area of about 0.5 hectares. Located at 43°N 84°E, Shihezi has a typical temperate continental climate, with an average temperature of 25.1–26.1°C, annual precipitation of 125.0–207.7 mm, and long sunshine hours during summer. As an essential economic crop in Shihezi, cotton accounted for more than 85% of the crop planting area, with the scale, intensive, and large-scale mechanization level ranking first in China’s three major cotton planting regions, making Shihezi an important base for the development of intelligent cotton production.


### 2.2. Data Acquisition and Preprocessing

#### 2.2.1. Multispectral Data Acquisition

The experiment was conducted using 10 kg XAG XMISSION UAV with a maximum load of 6 kg. The target plot was selected by logging into the XAG control system using a smartphone, and the UAV flew according to the route trajectory automatically planned by the system at an altitude of 7 m and a speed of 3 m/s. The data collection time was 2 : 00 pm every day. The multispectral camera covered four wavelength bands of 550, 660, 735, and 790 nm, with 20 megapixels, image resolution of3863∗3648 pixels, and camera weight of 0.85 kg, suitable to be carried on the UAV flight platform for operation. During the experiment, a 50∗50 cm standard white board was placed on the experimental plot as the radiation correction data for the remote sensing data. The UAV image remote sensing experiment was shown in Figure 1.Figure 1
Cotton remote sensing information collection image.


#### 2.2.2. Multispectral Data Preprocessing

The multispectral remote sensing data on cotton canopy should be preprocessed after acquisition. The spectral resolution was 10 nm, and the spatial resolution of graphics was0.02m∗0.02m. The preprocessing of remote sensing data mainly included two steps. (1) Selection of the region of interest (ROI). A rectangular box of 50∗50 pixels was used for each spectral band in each image. The area of all cotton in the image was manually selected as the ROI, and the mean within the ROI was obtained as the spectral value of that band in the image. (2) Radiation correction of multispectral remote sensing images. A rectangular box of 30∗30 pixels was used to select the standard whiteboard position as the white correction region. The spectral values of the white correction region were averaged, and radiation correction was performed on the multispectral remote sensing data according to equation (1), where I represented the average spectral value of the ROI in a certain band, W represented the average spectral value of the standard white correction region in that band on that day, B represented the mean pixel of that band when the lens was covered on that day, and CI represented the spectral reflectance of that band after radiation correction on that day; 20–30 data samples were collected per day, and a total of 1,040 data samples were obtained.(1)CI=I−BW−B.Figure2 shows the means of the reflectance of samples collected at different wavelengths during the 12-day data acquisition period. The trend of the image indicated that the range of spectral reflectance valued at 550 nm and 660 nm was close, with a slightly similar trend of data change. The range and trend of reflectance values at 730 nm and 790 nm were also basically the same, and the reflectance values gradually decreased as the acquisition time changes.Figure 2
Schematic diagram of changes in multispectral reflectance values. (a) 550 nm. (b) 660 nm. (c) 730 nm. (d) 790 nm.
(a)(b)(c)(d)Acquisition of data on cotton plant height, number of fruiting branches, number of flower buds, and determination of topping time is done.To determine the correlation between the spectral information of cotton canopy and the indexes such as cotton plant height, number of fruiting branches, and number of flower buds, the aforesaid indexes were measured in the field. Five plants at a distance with fixed location in the experimental plot were randomly selected as sample measuring points. The sample heights of these five fixed cotton plants were measured daily using a tape and averaged as the plant height in the plot. The number of fruiting branches and flower buds of the five fixed plants were measured by the counting method and averaged as the number of fruiting branches and flower buds in the plot on that day. The variation of cotton plant height, number of fruiting branches, and flower buds over time was shown in Figure3.Figure 3
Measurement of cotton plant height, fruit branches, and flower buds. (a) The number of cotton plant height. (b) The number of fruiting branches. (c) The number of flower buds.
(a)(b)(c)The figure indicated that cotton plant height, number of fruiting branches, and number of flower buds continue to increase from 62 cm, 6.5, and 17 on day 1 until days 7–8, when almost no changes were observed. Topping operation was performed in the experimental plot on day 8. It could be seen from the figure that cotton indexes were no longer changed after topping.


### 2.3. Data Processing Methods

#### 2.3.1. Decision Tree

The decision tree algorithm is a data mining algorithm featuring high readability and fast computing speed, etc. Decision trees are constructed based on the calculation of conditional probabilities. The decision tree consists of two main processes: structure building and pruning. During learning, a decision tree model is established using the training data based on the principle of loss function minimization.Common algorithms used for decision tree building include ID3 and C4.5 algorithms. Maximum likelihood estimation (MLE) is used in the decision tree for probabilistic model calculation. The core of both algorithms is to select features at each node of the decision tree using information gain (ratio), build a decision tree based on the recursive method, calculate all possible feature information gains (ratios) for the nodes starting from the root node, and select the feature with the largest information gain (ratio) as the node feature. Child nodes are established based on various values of this feature, and the above method is recursively called on the child nodes to build the decision tree until all features have minimal gain (ratio) or no feature position, where information gain is used in ID3 to select features, and information gain ratio is used in C4.5 to select features about cotton canopy.(2)gD,A=HD−HD|A,(3)grD,A=gD,AHAD,(4)HAD=−∑n=1NDiDlog2DiD.Equation (2) indicates the information gain, in which the training dataset is D, the feature is A, and HD represents the empirical entropy of the dataset D. HD|A represents the empirical conditional entropy of feature A on the dataset, where n is the number of values taken for feature A. Equations (3) and (4) indicate the information gain ratio. In the input space where the training dataset is located, each region is recursively divided into two subregions. The letters in equations (3) and (4) have the same meaning as equation (2). This paper chooses formula (3) as the cost function. The output values in each subregions are determined, and a binomial decision tree is established.


#### 2.3.2. Decision Tree Algorithm Based on Ensemble Learning

Ensemble learning is widely used in machine and statistical learning. The ensemble approach includes training different single regression models independently using the same or different datasets with different parameters among individual regression models. The final expected output is obtained by identifying the output mean of all single or multiple one-class classifiers.Algorithm 1: Bagging algorithm.
Input: training setD=x1,y1,x2,y2,……,xn,yn, base learning algorithm ξ, xi=xi1,xi2……xin represents an input instance, n is the number of features, yi∈1,2,…K, represents the regression label, i = 1,2, …, N, N represents dataset size, number of training rounds for T.Output:Hx=argmax∑t=1T∏htx−y.(1)
fort = 1, 2, …, T do(2)
ht=ξD,Dbs, Dbs represents the training set D is randomly sampled t times, and a total of m times are collected to obtain a sampling set containing m samples.(3)
end(1)
Random Forests. Random forests are an ensemble of decision trees and bagging. The Bagging Algorithm 1 is described as follows.To increase randomness,n samples are selected using sampling with replacement in the sample acquisition process.(1)
n samples are selected from the sample set using Bootstrap sampling (sampling with replacement)(2)
k attributes are randomly selected from all attributes, and the best segmentation attributes are taken as nodes to build a CART decision tree(3)
The above two steps are repeatedm times; that is, m CART decision trees are established(4)
Them CART decision trees form a random forest, and data regression values are determined through voting results(2)
AdaBoost + Decision Tree. AdaBoost is an adaptive augmented learning Algorithm 2, which is described as follows.Algorithm 2: AdaBoost algorithm.
Input: training datasetT=x1,y1,x2,y2….,xn,yn, where sample xi∈Χ∈¯Rn, yi∈y, ℵ is the instance space, and y is the set of tokens.Output: final regression algorithm:G(x).(1)
Initialize the weight distribution of the training data,w weight value for each data.Di=w1,…,w1i…,w1N,w1i=1/N,i=1,2…,N(2)
Form=1,2,…,M. M represents the total amount of the simple regression model.(a)
Perform learning using the training dataset with weight distributionD1 to obtain the base regression model Gmx.Gmx:Χ⟶y(b)
Calculate the error rate ofGmx on the training dataset, where P represents the distance between Gmxi and yi, this paper chooses the mean square error distance.em=∑i=1NPGmxi−yi(c)
Calculate the coefficient ofGmxi.αm=1/2log1−em/em(d)
Update the weight distribution of the training datasetDm+1=wm+1,1,…,wm+1,i,…,wm+1,N,wm+1,i=wmi/Zmexp−αmyiGmx,i=1,2,…,NWhereZm is the normalization factorZm=∑i=1Nwmiexp−αmyiGmxWhich makesDm+1 a probability distribution.(3)
Construct a linear combination of the basic regression modelfx=∑m=1MαmGmxTo obtain the final regression model.Gx=signfx=sign∑m=1MαmGmxIn this paper,Gm adopts the decision tree model.


#### 2.3.3. Other Multispectral Analysis Algorithms

Common base regression methods may include multivariate linear regression, neural network, support vector machine, decision tree, etc.The multivariate linear method fits the input spectral data and the target data by identifying the reasonable polynomial parameters, with relatively short training time. However, its fitting effect on linear indistinguishable data is relatively poor. In the neural network, vector multiplication and nonlinear activation function are used to multiply the input data with the connection weights, map the result to the nonlinear space, and adjust the connection weights by backpropagation (BP) to obtain a relatively good fitting effect. In the support vector machine, kernel functions with linear or nonlinear kernels can be selected to map data into a high-dimensional space and extract high-dimensional features of the data by identifying the maximum margin separating hyperplane. The neural network and support vector machine integrate feature extraction and regression analysis. The subset with the lowest root-mean-square difference is verified by cross-validation to obtain the optimal band subset for the purpose of feature extraction and regression analysis.


## 2.1. Overview of Experimental Area and Materials

The experimental cotton variety in this paper is Xinluzao 68 (early maturing hybrid cotton variety). The data were collected from July 1, 2021, to July 12, 2021. The multispectral remote sensing information of cotton canopy, as well as crop growth indexed affecting the topping time and strategy, was collected continuously for 12 days before and after topping. Topping was performed in the experimental plot on July 8. Data were collected at the location of the 8th Division of Xinjiang Production and Construction Corps in Shihezi, Xinjiang, with an experimental plot area of about 0.5 hectares. Located at 43°N 84°E, Shihezi has a typical temperate continental climate, with an average temperature of 25.1–26.1°C, annual precipitation of 125.0–207.7 mm, and long sunshine hours during summer. As an essential economic crop in Shihezi, cotton accounted for more than 85% of the crop planting area, with the scale, intensive, and large-scale mechanization level ranking first in China’s three major cotton planting regions, making Shihezi an important base for the development of intelligent cotton production.


## 2.2. Data Acquisition and Preprocessing

### 2.2.1. Multispectral Data Acquisition

The experiment was conducted using 10 kg XAG XMISSION UAV with a maximum load of 6 kg. The target plot was selected by logging into the XAG control system using a smartphone, and the UAV flew according to the route trajectory automatically planned by the system at an altitude of 7 m and a speed of 3 m/s. The data collection time was 2 : 00 pm every day. The multispectral camera covered four wavelength bands of 550, 660, 735, and 790 nm, with 20 megapixels, image resolution of3863∗3648 pixels, and camera weight of 0.85 kg, suitable to be carried on the UAV flight platform for operation. During the experiment, a 50∗50 cm standard white board was placed on the experimental plot as the radiation correction data for the remote sensing data. The UAV image remote sensing experiment was shown in Figure 1.Figure 1
Cotton remote sensing information collection image.


### 2.2.2. Multispectral Data Preprocessing

The multispectral remote sensing data on cotton canopy should be preprocessed after acquisition. The spectral resolution was 10 nm, and the spatial resolution of graphics was0.02m∗0.02m. The preprocessing of remote sensing data mainly included two steps. (1) Selection of the region of interest (ROI). A rectangular box of 50∗50 pixels was used for each spectral band in each image. The area of all cotton in the image was manually selected as the ROI, and the mean within the ROI was obtained as the spectral value of that band in the image. (2) Radiation correction of multispectral remote sensing images. A rectangular box of 30∗30 pixels was used to select the standard whiteboard position as the white correction region. The spectral values of the white correction region were averaged, and radiation correction was performed on the multispectral remote sensing data according to equation (1), where I represented the average spectral value of the ROI in a certain band, W represented the average spectral value of the standard white correction region in that band on that day, B represented the mean pixel of that band when the lens was covered on that day, and CI represented the spectral reflectance of that band after radiation correction on that day; 20–30 data samples were collected per day, and a total of 1,040 data samples were obtained.(1)CI=I−BW−B.Figure2 shows the means of the reflectance of samples collected at different wavelengths during the 12-day data acquisition period. The trend of the image indicated that the range of spectral reflectance valued at 550 nm and 660 nm was close, with a slightly similar trend of data change. The range and trend of reflectance values at 730 nm and 790 nm were also basically the same, and the reflectance values gradually decreased as the acquisition time changes.Figure 2
Schematic diagram of changes in multispectral reflectance values. (a) 550 nm. (b) 660 nm. (c) 730 nm. (d) 790 nm.
(a)(b)(c)(d)Acquisition of data on cotton plant height, number of fruiting branches, number of flower buds, and determination of topping time is done.To determine the correlation between the spectral information of cotton canopy and the indexes such as cotton plant height, number of fruiting branches, and number of flower buds, the aforesaid indexes were measured in the field. Five plants at a distance with fixed location in the experimental plot were randomly selected as sample measuring points. The sample heights of these five fixed cotton plants were measured daily using a tape and averaged as the plant height in the plot. The number of fruiting branches and flower buds of the five fixed plants were measured by the counting method and averaged as the number of fruiting branches and flower buds in the plot on that day. The variation of cotton plant height, number of fruiting branches, and flower buds over time was shown in Figure3.Figure 3
Measurement of cotton plant height, fruit branches, and flower buds. (a) The number of cotton plant height. (b) The number of fruiting branches. (c) The number of flower buds.
(a)(b)(c)The figure indicated that cotton plant height, number of fruiting branches, and number of flower buds continue to increase from 62 cm, 6.5, and 17 on day 1 until days 7–8, when almost no changes were observed. Topping operation was performed in the experimental plot on day 8. It could be seen from the figure that cotton indexes were no longer changed after topping.


## 2.2.1. Multispectral Data Acquisition

The experiment was conducted using 10 kg XAG XMISSION UAV with a maximum load of 6 kg. The target plot was selected by logging into the XAG control system using a smartphone, and the UAV flew according to the route trajectory automatically planned by the system at an altitude of 7 m and a speed of 3 m/s. The data collection time was 2 : 00 pm every day. The multispectral camera covered four wavelength bands of 550, 660, 735, and 790 nm, with 20 megapixels, image resolution of3863∗3648 pixels, and camera weight of 0.85 kg, suitable to be carried on the UAV flight platform for operation. During the experiment, a 50∗50 cm standard white board was placed on the experimental plot as the radiation correction data for the remote sensing data. The UAV image remote sensing experiment was shown in Figure 1.Figure 1
Cotton remote sensing information collection image.


## 2.2.2. Multispectral Data Preprocessing

The multispectral remote sensing data on cotton canopy should be preprocessed after acquisition. The spectral resolution was 10 nm, and the spatial resolution of graphics was0.02m∗0.02m. The preprocessing of remote sensing data mainly included two steps. (1) Selection of the region of interest (ROI). A rectangular box of 50∗50 pixels was used for each spectral band in each image. The area of all cotton in the image was manually selected as the ROI, and the mean within the ROI was obtained as the spectral value of that band in the image. (2) Radiation correction of multispectral remote sensing images. A rectangular box of 30∗30 pixels was used to select the standard whiteboard position as the white correction region. The spectral values of the white correction region were averaged, and radiation correction was performed on the multispectral remote sensing data according to equation (1), where I represented the average spectral value of the ROI in a certain band, W represented the average spectral value of the standard white correction region in that band on that day, B represented the mean pixel of that band when the lens was covered on that day, and CI represented the spectral reflectance of that band after radiation correction on that day; 20–30 data samples were collected per day, and a total of 1,040 data samples were obtained.(1)CI=I−BW−B.Figure2 shows the means of the reflectance of samples collected at different wavelengths during the 12-day data acquisition period. The trend of the image indicated that the range of spectral reflectance valued at 550 nm and 660 nm was close, with a slightly similar trend of data change. The range and trend of reflectance values at 730 nm and 790 nm were also basically the same, and the reflectance values gradually decreased as the acquisition time changes.Figure 2
Schematic diagram of changes in multispectral reflectance values. (a) 550 nm. (b) 660 nm. (c) 730 nm. (d) 790 nm.
(a)(b)(c)(d)Acquisition of data on cotton plant height, number of fruiting branches, number of flower buds, and determination of topping time is done.To determine the correlation between the spectral information of cotton canopy and the indexes such as cotton plant height, number of fruiting branches, and number of flower buds, the aforesaid indexes were measured in the field. Five plants at a distance with fixed location in the experimental plot were randomly selected as sample measuring points. The sample heights of these five fixed cotton plants were measured daily using a tape and averaged as the plant height in the plot. The number of fruiting branches and flower buds of the five fixed plants were measured by the counting method and averaged as the number of fruiting branches and flower buds in the plot on that day. The variation of cotton plant height, number of fruiting branches, and flower buds over time was shown in Figure3.Figure 3
Measurement of cotton plant height, fruit branches, and flower buds. (a) The number of cotton plant height. (b) The number of fruiting branches. (c) The number of flower buds.
(a)(b)(c)The figure indicated that cotton plant height, number of fruiting branches, and number of flower buds continue to increase from 62 cm, 6.5, and 17 on day 1 until days 7–8, when almost no changes were observed. Topping operation was performed in the experimental plot on day 8. It could be seen from the figure that cotton indexes were no longer changed after topping.


## 2.3. Data Processing Methods

### 2.3.1. Decision Tree

The decision tree algorithm is a data mining algorithm featuring high readability and fast computing speed, etc. Decision trees are constructed based on the calculation of conditional probabilities. The decision tree consists of two main processes: structure building and pruning. During learning, a decision tree model is established using the training data based on the principle of loss function minimization.Common algorithms used for decision tree building include ID3 and C4.5 algorithms. Maximum likelihood estimation (MLE) is used in the decision tree for probabilistic model calculation. The core of both algorithms is to select features at each node of the decision tree using information gain (ratio), build a decision tree based on the recursive method, calculate all possible feature information gains (ratios) for the nodes starting from the root node, and select the feature with the largest information gain (ratio) as the node feature. Child nodes are established based on various values of this feature, and the above method is recursively called on the child nodes to build the decision tree until all features have minimal gain (ratio) or no feature position, where information gain is used in ID3 to select features, and information gain ratio is used in C4.5 to select features about cotton canopy.(2)gD,A=HD−HD|A,(3)grD,A=gD,AHAD,(4)HAD=−∑n=1NDiDlog2DiD.Equation (2) indicates the information gain, in which the training dataset is D, the feature is A, and HD represents the empirical entropy of the dataset D. HD|A represents the empirical conditional entropy of feature A on the dataset, where n is the number of values taken for feature A. Equations (3) and (4) indicate the information gain ratio. In the input space where the training dataset is located, each region is recursively divided into two subregions. The letters in equations (3) and (4) have the same meaning as equation (2). This paper chooses formula (3) as the cost function. The output values in each subregions are determined, and a binomial decision tree is established.


### 2.3.2. Decision Tree Algorithm Based on Ensemble Learning

Ensemble learning is widely used in machine and statistical learning. The ensemble approach includes training different single regression models independently using the same or different datasets with different parameters among individual regression models. The final expected output is obtained by identifying the output mean of all single or multiple one-class classifiers.Algorithm 1: Bagging algorithm.
Input: training setD=x1,y1,x2,y2,……,xn,yn, base learning algorithm ξ, xi=xi1,xi2……xin represents an input instance, n is the number of features, yi∈1,2,…K, represents the regression label, i = 1,2, …, N, N represents dataset size, number of training rounds for T.Output:Hx=argmax∑t=1T∏htx−y.(1)
fort = 1, 2, …, T do(2)
ht=ξD,Dbs, Dbs represents the training set D is randomly sampled t times, and a total of m times are collected to obtain a sampling set containing m samples.(3)
end(1)
Random Forests. Random forests are an ensemble of decision trees and bagging. The Bagging Algorithm 1 is described as follows.To increase randomness,n samples are selected using sampling with replacement in the sample acquisition process.(1)
n samples are selected from the sample set using Bootstrap sampling (sampling with replacement)(2)
k attributes are randomly selected from all attributes, and the best segmentation attributes are taken as nodes to build a CART decision tree(3)
The above two steps are repeatedm times; that is, m CART decision trees are established(4)
Them CART decision trees form a random forest, and data regression values are determined through voting results(2)
AdaBoost + Decision Tree. AdaBoost is an adaptive augmented learning Algorithm 2, which is described as follows.Algorithm 2: AdaBoost algorithm.
Input: training datasetT=x1,y1,x2,y2….,xn,yn, where sample xi∈Χ∈¯Rn, yi∈y, ℵ is the instance space, and y is the set of tokens.Output: final regression algorithm:G(x).(1)
Initialize the weight distribution of the training data,w weight value for each data.Di=w1,…,w1i…,w1N,w1i=1/N,i=1,2…,N(2)
Form=1,2,…,M. M represents the total amount of the simple regression model.(a)
Perform learning using the training dataset with weight distributionD1 to obtain the base regression model Gmx.Gmx:Χ⟶y(b)
Calculate the error rate ofGmx on the training dataset, where P represents the distance between Gmxi and yi, this paper chooses the mean square error distance.em=∑i=1NPGmxi−yi(c)
Calculate the coefficient ofGmxi.αm=1/2log1−em/em(d)
Update the weight distribution of the training datasetDm+1=wm+1,1,…,wm+1,i,…,wm+1,N,wm+1,i=wmi/Zmexp−αmyiGmx,i=1,2,…,NWhereZm is the normalization factorZm=∑i=1Nwmiexp−αmyiGmxWhich makesDm+1 a probability distribution.(3)
Construct a linear combination of the basic regression modelfx=∑m=1MαmGmxTo obtain the final regression model.Gx=signfx=sign∑m=1MαmGmxIn this paper,Gm adopts the decision tree model.


### 2.3.3. Other Multispectral Analysis Algorithms

Common base regression methods may include multivariate linear regression, neural network, support vector machine, decision tree, etc.The multivariate linear method fits the input spectral data and the target data by identifying the reasonable polynomial parameters, with relatively short training time. However, its fitting effect on linear indistinguishable data is relatively poor. In the neural network, vector multiplication and nonlinear activation function are used to multiply the input data with the connection weights, map the result to the nonlinear space, and adjust the connection weights by backpropagation (BP) to obtain a relatively good fitting effect. In the support vector machine, kernel functions with linear or nonlinear kernels can be selected to map data into a high-dimensional space and extract high-dimensional features of the data by identifying the maximum margin separating hyperplane. The neural network and support vector machine integrate feature extraction and regression analysis. The subset with the lowest root-mean-square difference is verified by cross-validation to obtain the optimal band subset for the purpose of feature extraction and regression analysis.


## 2.3.1. Decision Tree

The decision tree algorithm is a data mining algorithm featuring high readability and fast computing speed, etc. Decision trees are constructed based on the calculation of conditional probabilities. The decision tree consists of two main processes: structure building and pruning. During learning, a decision tree model is established using the training data based on the principle of loss function minimization.Common algorithms used for decision tree building include ID3 and C4.5 algorithms. Maximum likelihood estimation (MLE) is used in the decision tree for probabilistic model calculation. The core of both algorithms is to select features at each node of the decision tree using information gain (ratio), build a decision tree based on the recursive method, calculate all possible feature information gains (ratios) for the nodes starting from the root node, and select the feature with the largest information gain (ratio) as the node feature. Child nodes are established based on various values of this feature, and the above method is recursively called on the child nodes to build the decision tree until all features have minimal gain (ratio) or no feature position, where information gain is used in ID3 to select features, and information gain ratio is used in C4.5 to select features about cotton canopy.(2)gD,A=HD−HD|A,(3)grD,A=gD,AHAD,(4)HAD=−∑n=1NDiDlog2DiD.Equation (2) indicates the information gain, in which the training dataset is D, the feature is A, and HD represents the empirical entropy of the dataset D. HD|A represents the empirical conditional entropy of feature A on the dataset, where n is the number of values taken for feature A. Equations (3) and (4) indicate the information gain ratio. In the input space where the training dataset is located, each region is recursively divided into two subregions. The letters in equations (3) and (4) have the same meaning as equation (2). This paper chooses formula (3) as the cost function. The output values in each subregions are determined, and a binomial decision tree is established.


## 2.3.2. Decision Tree Algorithm Based on Ensemble Learning

Ensemble learning is widely used in machine and statistical learning. The ensemble approach includes training different single regression models independently using the same or different datasets with different parameters among individual regression models. The final expected output is obtained by identifying the output mean of all single or multiple one-class classifiers.Algorithm 1: Bagging algorithm.
Input: training setD=x1,y1,x2,y2,……,xn,yn, base learning algorithm ξ, xi=xi1,xi2……xin represents an input instance, n is the number of features, yi∈1,2,…K, represents the regression label, i = 1,2, …, N, N represents dataset size, number of training rounds for T.Output:Hx=argmax∑t=1T∏htx−y.(1)
fort = 1, 2, …, T do(2)
ht=ξD,Dbs, Dbs represents the training set D is randomly sampled t times, and a total of m times are collected to obtain a sampling set containing m samples.(3)
end(1)
Random Forests. Random forests are an ensemble of decision trees and bagging. The Bagging Algorithm 1 is described as follows.To increase randomness,n samples are selected using sampling with replacement in the sample acquisition process.(1)
n samples are selected from the sample set using Bootstrap sampling (sampling with replacement)(2)
k attributes are randomly selected from all attributes, and the best segmentation attributes are taken as nodes to build a CART decision tree(3)
The above two steps are repeatedm times; that is, m CART decision trees are established(4)
Them CART decision trees form a random forest, and data regression values are determined through voting results(2)
AdaBoost + Decision Tree. AdaBoost is an adaptive augmented learning Algorithm 2, which is described as follows.Algorithm 2: AdaBoost algorithm.
Input: training datasetT=x1,y1,x2,y2….,xn,yn, where sample xi∈Χ∈¯Rn, yi∈y, ℵ is the instance space, and y is the set of tokens.Output: final regression algorithm:G(x).(1)
Initialize the weight distribution of the training data,w weight value for each data.Di=w1,…,w1i…,w1N,w1i=1/N,i=1,2…,N(2)
Form=1,2,…,M. M represents the total amount of the simple regression model.(a)
Perform learning using the training dataset with weight distributionD1 to obtain the base regression model Gmx.Gmx:Χ⟶y(b)
Calculate the error rate ofGmx on the training dataset, where P represents the distance between Gmxi and yi, this paper chooses the mean square error distance.em=∑i=1NPGmxi−yi(c)
Calculate the coefficient ofGmxi.αm=1/2log1−em/em(d)
Update the weight distribution of the training datasetDm+1=wm+1,1,…,wm+1,i,…,wm+1,N,wm+1,i=wmi/Zmexp−αmyiGmx,i=1,2,…,NWhereZm is the normalization factorZm=∑i=1Nwmiexp−αmyiGmxWhich makesDm+1 a probability distribution.(3)
Construct a linear combination of the basic regression modelfx=∑m=1MαmGmxTo obtain the final regression model.Gx=signfx=sign∑m=1MαmGmxIn this paper,Gm adopts the decision tree model.


## 2.3.3. Other Multispectral Analysis Algorithms

Common base regression methods may include multivariate linear regression, neural network, support vector machine, decision tree, etc.The multivariate linear method fits the input spectral data and the target data by identifying the reasonable polynomial parameters, with relatively short training time. However, its fitting effect on linear indistinguishable data is relatively poor. In the neural network, vector multiplication and nonlinear activation function are used to multiply the input data with the connection weights, map the result to the nonlinear space, and adjust the connection weights by backpropagation (BP) to obtain a relatively good fitting effect. In the support vector machine, kernel functions with linear or nonlinear kernels can be selected to map data into a high-dimensional space and extract high-dimensional features of the data by identifying the maximum margin separating hyperplane. The neural network and support vector machine integrate feature extraction and regression analysis. The subset with the lowest root-mean-square difference is verified by cross-validation to obtain the optimal band subset for the purpose of feature extraction and regression analysis.


## 3. Experiments and Results

The multispectral data after radiation correction were used as inputs to establish a regression prediction model for cotton plant height, number of fruiting branches, number of flower buds, and other indexes. The regression model adopted many common base regression methods such as multivariate linear regression, neural network, support vector machine, and decision tree. The wave spectra were first input into the simple regression model to analyze the effect of each spectrum on the prediction results. Subsequently, multiple wave bands were combined for regression analysis based on the regression results. Due to the short data acquisition interval and minor changes in cotton plant growth, the fitting effect of the simple regression model was compared to improve the feature extraction and target fitting capacity of the model. The model with good fitting effect and stable performance was selected as the basis for improvement, and the ensemble learning algorithms of bagging and AdaBoost were used to improve the prediction capacity of the simple regression model, respectively.


### 3.1. Dataset and Experimental Environment

The dataset consists of 1040 pieces of data. The input data is cotton multispectral data, and the label data were cotton plant height, number of fruiting branches, and number of flower buds. The algorithm was iterated 30,000 times to ensure model convergence; 920 samples were used as model training samples, and 120 data samples as test samples. All algorithms that require iteration were iterated 1000 times. Algorithm implementation was based on python platform. The processor adopted is Intel i9; the operating system was Windows 10.


### 3.2. Regression Models of Cotton Canopy Spectra for Cotton Plant Height, Number of Fruiting Branches, and Flower Buds at Different Wavelengths

In this paper, the spectral reflectance at different wavelengths was firstly input into various common base regression models for analysis on the cotton plant height, number of fruiting branches, and number of flower buds, respectively. The fitting results are shown in Table1.Table 1
Regression table of single band and the number of cotton plant height, flower buds, and fruiting branches.
Input band (nm)Fitting indexMethodFitting resultR2RMSEP550Cotton plant heightMultivariate linear regression0.022.61Neural network0.1129.08Support vector machine0.0927.48Decision tree0.3530.59660Cotton plant heightMultivariate linear regression0.022.65Neural network0.3134.18Support vector machine0.1229.43Decision tree0.3130.17730Cotton plant heightMultivariate linear regression0.441.98Neural network0.6020.34Support vector machine0.6522.86Decision tree0.8337.62790Cotton plant heightMultivariate linear regression0.322.17Neural network0.5124.31Support vector machine0.7922.80Decision tree0.7836.80550Number of flower budsMultivariate linear regression0.010.64Neural network0.076.98Support vector machine0.247.01Decision tree0.387.49660Number of flower budsMultivariate linear regression0.020.65Neural network0.267.75Support vector machine0.137.28Decision tree0.387.50730Number of flower budsMultivariate linear regression0.460.47Neural network0.554.74Support vector machine0.805.33Decision tree0.819.02790Number of flower budsMultivariate linear regression0.320.53Neural network0.515.16Support vector machine0.745.88Decision tree0.768.83550Number of fruiting branchesMultivariate linear regression0.020.65Neural network0.287.99Support vector machine0.116.91Decision tree0.357.62660Number of fruiting branchesMultivariate linear regression0.020.66Neural network0.147.54Support vector machine0.107.29Decision tree0.317.52730Number of fruiting branchesMultivariate linear regression0.430.49Neural network0.664.93Support vector machine0.765.65Decision tree0.839.33790Number of fruiting branchesMultivariate linear regression0.320.54Neural network0.585.48Support vector machine0.785.78Decision tree0.799.19The fitting results indicated that the 730 nm band showed the best fit for plant height, number of flower buds, and number of fruiting branches, followed by the 790 nm band, with the fitting coefficients of above 0.65 for all three targets; the 790 nm band had relatively poor fit, with the fitting coefficients of below 0.3 for all targets; the 660 nm band had the worst fit, with the fitting coefficients of below 0.1 for all targets.In terms of regression methods, neural network and decision tree had better regression results in regression models for a single band. The regression coefficients and prediction mean square error (RMSEP) of the neural network were slightly higher than those of the decision tree. This suggested that the neural network fitted the data well, but the effect was unstable; SVM was second to the aforesaid two methods in regression coefficients; multiple linear regression had the worst effect, indicating that multispectral data were nonlinear and should be extracted by nonlinear methods.


### 3.3. Regression Model of Conventional Vegetation Index (VI) for Cotton Plant Height, Number of Fruiting Branches, and Number of Flower Buds

Regression was performed on cotton plant height, number of flower buds, and fruiting branches using multiple conventional VIs. Due to the experimental equipment used in this paper, the VIs associated with 660, 730, and 790 nm bands were selected for regression. Difference index (DI), difference vegetation index (DVI), red-edge chlorophyll index (CIrededge), normalized difference vegetation index (NDVI), green normalized difference vegetation index (GNDVI), and triangle vegetation index (TVI) were finally selected. The formula for calculating the indexes was as follows: R in the formula represented the spectrum, and the subscript numbers represented the band with the specified wavelength. Since the spectral resolution error of the spectral instrument was ±30 nm, R800 could be replaced by the 790 nm band, R680 and R670 could be replaced by the 660 nm band, and R720 and R750 could be replaced by the 730 nm bank. The regression effects are shown in Table 2.(5)DI=R800−R550,DVI=R800−R680,CIrededgt=R800R720−1,NDVI=R780−R670R780+R670,GNDVI=R800−R550R800+R550,TVI=0.5∗120∗R750−R550−200∗R670−R550.Table 2
Regression table of traditional vegetation index and the cotton plant height, flower buds, and fruiting branches.
Input bandFitting indexMethodFitting resultR2RMSEPDICotton plant heightMultivariate linear regression0.282.23Neural network0.422.30Support vector machine0.552.72Decision tree0.653.39Number of flower budsMultivariate linear regression0.280.54Neural network0.485.67Support vector machine0.535.80Decision tree0.678.44Number of fruiting branchesMultivariate linear regression0.280.56Neural network0.455.66Support vector machine0.515.75Decision tree0.658.57DVICotton plant heightMultivariate linear regression0.322.17Neural network0.432.81Support vector machine0.652.65Decision tree0.733.86Number of flower budsMultivariate linear regression0.300.54Neural network0.543.52Support vector machine0.623.09Decision tree0.713.62Number of fruiting branchesMultivariate linear regression0.320.54Neural network0.452.02Support vector machine0.613.89Decision tree0.732.95NDVICotton plant heightMultivariate linear regression0.202.35Neural network0.222.06Support vector machine0.602.44Decision tree0.543.93Number of flower budsMultivariate linear regression0.170.58Neural network0.280.70Support vector machine0.600.74Decision tree0.540.75Number of fruiting branchesMultivariate linear regression0.200.59Neural network0.260.66Support vector machine0.600.34Decision tree0.550.81CIrededgeCotton plant heightMultivariate linear regression0.320.21Neural network0.760.71Support vector machine0.790.73Decision tree0.490.96Number of flower budsMultivariate linear regression0.310.53Neural network0.590.17Support vector machine0.770.19Decision tree0.460.71Number of fruiting branchesMultivariate linear regression0.320.54Neural network0.620.16Support vector machine0.790.18Decision tree0.470.49GNDVICotton plant heightMultivariate linear regression0.132.45Neural network0.132.67Support vector machine0.192.87Decision tree0.443.15Number of flower budsMultivariate linear regression0.140.59Neural network0.240.85Support vector machine0.300.72Decision tree0.450.77Number of fruiting branchesMultivariate linear regression0.130.61Neural network0.150.88Support vector machine0.220.73Decision tree0.440.78TVICotton plant heightMultivariate linear regression0.172.40Neural network0.112.14Support vector machine0.563.51Decision tree0.573.45Number of flower budsMultivariate linear regression0.150.59Neural network0.160.68Support vector machine0.790.98Decision tree0.560.84Number of fruiting branchesMultivariate linear regression0.160.60Neural network0.160.68Support vector machine0.940.99Decision tree0.570.32The results in Table2 indicated that the regression effects of two conventional VIs, DVI and CIrededge, on the cotton plant height, number of buds, and number of fruiting branches were relatively stable, with the determination fitting coefficient (R2) of above 0.5, whereas the other indexes had unstable fits to the three indexes, and the changes in the fitting indexes and methods had a significant impact on the fitting effects. The regression effect of combined spectral data was better than that of single spectral data, in which the fitting effect of VI involving the 550, 730, and 790 nm bands was better, same as single spectral data in the regression effect.


### 3.4. Regression Model of Multispectral Data of Cotton Canopy for Cotton Plant Height, Number of Fruiting Branches, Flower Buds in Different Band Combinations

In Table3, new band combinations were input into the regression model by superimposing bands with relatively good regression effects for analysis. The results indicated that the regression effect of 730 + 790 nm band combination was better than that of single bands, with regression coefficients of up to above 0.80 for cotton plant height, number of flower buds, and number of fruiting branches; the regression effect of 550 + 730 + 790 nm band combination was slightly better than that of 730 + 790 nm, suggesting that the 550 nm band had a positive effect on the fitting results. Regression was performed on the relevant indexes using the full band spectra. In the regression effect, degradation was observed compared to 730 + 790 nm and 550 + 730 + 790 nm band combinations. This suggested that the addition of 660 nm spectral band has a negative effect on regression. The 550 + 730 + 790 nm band combination and conventional VI had the same conclusion in the regression effect.Table 3
The regression table of the combinations band and the cotton of plant height, buds, and fruiting branches.
Input bandFitting indexMethodFitting resultR2RMSEP730 + 790 nmCotton plant heightMultivariate linear regression0.173.95Neural network0.913.04Support vector machine0.863.50Decision tree0.903.91Number of budsMultivariate linear regression0.460.48Neural network0.840.39Support vector machine0.800.73Decision tree0.890.30Number of fruiting branchesMultivariate linear regression0.660.49Neural network0.800.32Support vector machine0.650.89Decision tree0.900.32550 + 730+790 nmCotton plant heightMultivariate linear regression0.460.44Neural network0.950.22Support vector machine0.960.55Decision tree0.910.91Number of budsMultivariate linear regression0.460.44Neural network0.950.88Support vector machine0.960.55Decision tree0.910.98Number of fruiting branchesMultivariate linear regression0.440.89Neural network0.800.84Support vector machine0.650.18Decision tree0.910.75Full band spectraCotton plant heightMultivariate linear regression0.440.97Neural network0.870.52Support vector machine0.170.45Decision tree0.890.87Number of budsMultivariate linear regression0.460.47Neural network0.890.45Support vector machine0.180.02Decision tree0.890.38Number of fruiting branchesMultivariate linear regression0.660.49Neural network0.970.63Support vector machine0.170.11Decision tree0.890.96In terms of regression methods, both neural networks and decision trees had relatively good performance, with decision trees achieving higher correlation coefficients, lower RMSEP, and more stable regression results for multiple indexes than neural networks; support vector machine and multivariate linear regression model had general effects.


### 3.5. Band Combination Cotton Topping Index Regression Model Based on Improved Decision Tree

In terms of band combination, the 730 + 790 nm, 550 + 730 + 790 nm, and full band data were fitted using random forest and AdaBoost + decision tree methods, respectively. The fitting results were shown in Table3. The 550 + 730 + 790 nm spectral combination had better regression effects than 730 + 790 nm, indicating that 550 nm was positively correlated with the indexes in the cotton topping time, which can supplement the information of 730 and 790 nm spectral bands, whereas the full band had a worse regression effect than the 550 + 730 + 790 nm combination due to the relatively poor regression effect of 660 nm spectral band on cotton-related indexes that interfere with the regression effect. The results were shown in Table 4.Table 4
The regression of the combinations band and the cotton of plant height, buds, and fruiting branches with decision tree, random forests, and AdaBoost + decision tree.
Input bandFitting indexMethodFitting resultR2RMSEP730 + 790 nmCotton plant heightDecision tree0.900.91Random forests0.900.89AdaBoost + decision tree0.900.86Number of budsDecision tree0.890.30Random forests0.880.94AdaBoost + decision tree0.910.95Number of fruiting branchesDecision tree0.900.13Random forests0.900.79AdaBoost + decision tree0.950.99550 + 730+790 nmCotton plant heightDecision tree0.910.91Random forests0.880.51AdaBoost + decision tree0.960.40Number of flower budsDecision tree0.910.98Random forests0.810.68AdaBoost + decision tree0.840.49Number of fruiting branchesDecision tree0.910.75Random forests0.860.93AdaBoost + decision tree0.970.54Full band spectraCotton plant heightDecision tree0.890.87Random forests0.890.88AdaBoost + decision tree0.930.23Number of budsDecision tree0.890.38Random forests0.880.92AdaBoost + decision tree0.900.97Number of fruiting branchesDecision tree0.890.96Random forests0.900.97AdaBoost + decision tree0.950.52In terms of methods, among the simple regression models, the decision tree model and the neural network had better performance in the correlation coefficient of regression, with the decision tree having lower prediction RMSEP, indicating that it had a more stable prediction effect. Hence, the method was improved based on the decision tree in this paper. The decision tree model was improved on the regression model using boosting and AdaBoost methods. The boosting method improved the model fitting capacity by establishing different subsets and assigning different weights to various subsets; the AdaBoost method improved the feature extraction capacity of the model by establishing multiple regression models and assigning different weights to the regression models. The comparative analysis indicated that AdaBoost + decision tree had a better regression effect, higher correlation coefficient, lower prediction RMSEP, and stronger feature extraction capacity. As can be seen in Table5, decision tree, as a simple regression method, had the least time consumption, the time consumption of random forest was 0.69 s, and the time consumption of AdaBoost + decision tree was 0.98 s. The reason for this phenomenon was that random forest was an ensemble learning method based on bagging, each regression algorithm was trained in parallel, while in the AdaBoost method, each learning was serial, different basic regression algorithms had corresponding coefficients, and the coefficients were continuously adjusted during the training process, so the training time of AdaBoost + decision tree was longer than that of random forest. The results were shown in Table 5.Table 5
The comparison table of running time of each algorithm.
MethodRunning time/sDecision tree0.09Random forests0.69AdaBoost + decision tree0.98The 550 + 730 + 790 nm band combination had the highest fit for cotton plant height, number of buds, and number of fruiting branches, with the AdaBoost + decision tree method having the highest fitting coefficients (0.95, 0.96, and 0.84) and the lowest prediction RMSEP (0.40, 0.54, and 0.49). In the 730 + 790 nm band combination, the AdaBoost + decision tree method had the highest correlation coefficients for plant height, number of buds, and number of fruiting branches (0.90, 0.91, and 0.95). In the full band combination, the AdaBoost + decision tree method also had the highest fitting coefficients (0.93, 0.9, and 0.95) and the lowest prediction RMSEP (0.86, 0.95, and 0.99). The effects of AdaBoost + decision tree and 550 + 730 + 790 nm band combination on the predicted and measured data of cotton plant height, number of fruiting branches, and number of buds were shown in Figure4.Figure 4
Prediction of plant index during cotton topping based on AdaBoost + decision tree. (a) Prediction of cotton plant height. (b) Prediction of the number of fruiting branches. (c) Prediction of the number of flower buds.
(a)(b)(c)


### 3.6. Cotton Topping Time Determination Test

According to the requirements of cotton topping time in the Technical Guidance on Mechanized Cotton Production in Northwest Inland Cotton Growing Regions issued by the Ministry of Agriculture and Rural Affairs and related cotton planting agronomy, the appropriate topping time should be determined based on the cotton growth, plant height, number of fruiting branches, and other factors. Early topping should be performed as appropriate, and plant monitoring indexes should be determined based on the promotion of early maturity. In this paper, the topping indexes of Xinluzao 83 in Shihezi of Xinjiang were quantified according to the determined indexes in the topping time specified in the Technical Guidance after field investigation and experimental data analysis. The topping time determination indexes of this variety were determined as follows: plant height 65–70 cm, 9–11 fruiting branches, and 18–21 buds upon cotton topping.On this basis, whether to perform topping was determined based on the predicted indexes of plant height, number of fruiting branches, and number of buds according to the neural network, decision tree, random forest, and AdaBoost + decision tree methods in the 550 + 730 + 790 nm band combination. The predicted topping results are compared with the actual measured values, and the statistics of determination accuracy were shown in Table5. Table 5 indicated that the 550 + 730 + 790 nm band combination and AdaBoost + decision tree method had a better result in determining cotton topping time than the other band combinations and methods. The results were shown in Table 6.Table 6
Accuracy of cotton topping prediction based on regression model.
Input bandMethodAccuracy (%)550 + 730 + 790 nmNeural network85.14Decision tree85.23Random forests84.45AdaBoost + decision tree94.03730 + 790 nmNeural network86.39Decision tree84.17Random forests84.72AdaBoost + decision tree88.05Full band spectraNeural network87.22Decision tree85.14Random forests84.86AdaBoost + decision tree93.72According to the experimental results, the 550 + 730 + 790 nm data combined with decision tree, random forest, and AdaBoost + decision tree methods were selected to obtain the fitting models, and the model outputs were input into the topping determination model, respectively. In terms of determination accuracy, the AdaBoost + decision tree method showed a better fitting effect, and the 550 + 730 + 790 nm band combination had the best fit for cotton plant height, number of buds, and number of fruiting branches. Among them, the AdaBoost + decision tree method had the highest determination fitting coefficients (0.96, 0.84, and 0.97) and the lowest RMSEP (0.40 cm, 0.54, and 0.49). The data predicted by the model were input into the topping determination model, and the accuracy of determination was 94.03%. The topping prediction results had also corroborated that AdaBoost + decision tree was the best fitting model for cotton plant height, number of fruiting branches, and number of buds.


## 3.1. Dataset and Experimental Environment

The dataset consists of 1040 pieces of data. The input data is cotton multispectral data, and the label data were cotton plant height, number of fruiting branches, and number of flower buds. The algorithm was iterated 30,000 times to ensure model convergence; 920 samples were used as model training samples, and 120 data samples as test samples. All algorithms that require iteration were iterated 1000 times. Algorithm implementation was based on python platform. The processor adopted is Intel i9; the operating system was Windows 10.


## 3.2. Regression Models of Cotton Canopy Spectra for Cotton Plant Height, Number of Fruiting Branches, and Flower Buds at Different Wavelengths

In this paper, the spectral reflectance at different wavelengths was firstly input into various common base regression models for analysis on the cotton plant height, number of fruiting branches, and number of flower buds, respectively. The fitting results are shown in Table1.Table 1
Regression table of single band and the number of cotton plant height, flower buds, and fruiting branches.
Input band (nm)Fitting indexMethodFitting resultR2RMSEP550Cotton plant heightMultivariate linear regression0.022.61Neural network0.1129.08Support vector machine0.0927.48Decision tree0.3530.59660Cotton plant heightMultivariate linear regression0.022.65Neural network0.3134.18Support vector machine0.1229.43Decision tree0.3130.17730Cotton plant heightMultivariate linear regression0.441.98Neural network0.6020.34Support vector machine0.6522.86Decision tree0.8337.62790Cotton plant heightMultivariate linear regression0.322.17Neural network0.5124.31Support vector machine0.7922.80Decision tree0.7836.80550Number of flower budsMultivariate linear regression0.010.64Neural network0.076.98Support vector machine0.247.01Decision tree0.387.49660Number of flower budsMultivariate linear regression0.020.65Neural network0.267.75Support vector machine0.137.28Decision tree0.387.50730Number of flower budsMultivariate linear regression0.460.47Neural network0.554.74Support vector machine0.805.33Decision tree0.819.02790Number of flower budsMultivariate linear regression0.320.53Neural network0.515.16Support vector machine0.745.88Decision tree0.768.83550Number of fruiting branchesMultivariate linear regression0.020.65Neural network0.287.99Support vector machine0.116.91Decision tree0.357.62660Number of fruiting branchesMultivariate linear regression0.020.66Neural network0.147.54Support vector machine0.107.29Decision tree0.317.52730Number of fruiting branchesMultivariate linear regression0.430.49Neural network0.664.93Support vector machine0.765.65Decision tree0.839.33790Number of fruiting branchesMultivariate linear regression0.320.54Neural network0.585.48Support vector machine0.785.78Decision tree0.799.19The fitting results indicated that the 730 nm band showed the best fit for plant height, number of flower buds, and number of fruiting branches, followed by the 790 nm band, with the fitting coefficients of above 0.65 for all three targets; the 790 nm band had relatively poor fit, with the fitting coefficients of below 0.3 for all targets; the 660 nm band had the worst fit, with the fitting coefficients of below 0.1 for all targets.In terms of regression methods, neural network and decision tree had better regression results in regression models for a single band. The regression coefficients and prediction mean square error (RMSEP) of the neural network were slightly higher than those of the decision tree. This suggested that the neural network fitted the data well, but the effect was unstable; SVM was second to the aforesaid two methods in regression coefficients; multiple linear regression had the worst effect, indicating that multispectral data were nonlinear and should be extracted by nonlinear methods.


## 3.3. Regression Model of Conventional Vegetation Index (VI) for Cotton Plant Height, Number of Fruiting Branches, and Number of Flower Buds

Regression was performed on cotton plant height, number of flower buds, and fruiting branches using multiple conventional VIs. Due to the experimental equipment used in this paper, the VIs associated with 660, 730, and 790 nm bands were selected for regression. Difference index (DI), difference vegetation index (DVI), red-edge chlorophyll index (CIrededge), normalized difference vegetation index (NDVI), green normalized difference vegetation index (GNDVI), and triangle vegetation index (TVI) were finally selected. The formula for calculating the indexes was as follows: R in the formula represented the spectrum, and the subscript numbers represented the band with the specified wavelength. Since the spectral resolution error of the spectral instrument was ±30 nm, R800 could be replaced by the 790 nm band, R680 and R670 could be replaced by the 660 nm band, and R720 and R750 could be replaced by the 730 nm bank. The regression effects are shown in Table 2.(5)DI=R800−R550,DVI=R800−R680,CIrededgt=R800R720−1,NDVI=R780−R670R780+R670,GNDVI=R800−R550R800+R550,TVI=0.5∗120∗R750−R550−200∗R670−R550.Table 2
Regression table of traditional vegetation index and the cotton plant height, flower buds, and fruiting branches.
Input bandFitting indexMethodFitting resultR2RMSEPDICotton plant heightMultivariate linear regression0.282.23Neural network0.422.30Support vector machine0.552.72Decision tree0.653.39Number of flower budsMultivariate linear regression0.280.54Neural network0.485.67Support vector machine0.535.80Decision tree0.678.44Number of fruiting branchesMultivariate linear regression0.280.56Neural network0.455.66Support vector machine0.515.75Decision tree0.658.57DVICotton plant heightMultivariate linear regression0.322.17Neural network0.432.81Support vector machine0.652.65Decision tree0.733.86Number of flower budsMultivariate linear regression0.300.54Neural network0.543.52Support vector machine0.623.09Decision tree0.713.62Number of fruiting branchesMultivariate linear regression0.320.54Neural network0.452.02Support vector machine0.613.89Decision tree0.732.95NDVICotton plant heightMultivariate linear regression0.202.35Neural network0.222.06Support vector machine0.602.44Decision tree0.543.93Number of flower budsMultivariate linear regression0.170.58Neural network0.280.70Support vector machine0.600.74Decision tree0.540.75Number of fruiting branchesMultivariate linear regression0.200.59Neural network0.260.66Support vector machine0.600.34Decision tree0.550.81CIrededgeCotton plant heightMultivariate linear regression0.320.21Neural network0.760.71Support vector machine0.790.73Decision tree0.490.96Number of flower budsMultivariate linear regression0.310.53Neural network0.590.17Support vector machine0.770.19Decision tree0.460.71Number of fruiting branchesMultivariate linear regression0.320.54Neural network0.620.16Support vector machine0.790.18Decision tree0.470.49GNDVICotton plant heightMultivariate linear regression0.132.45Neural network0.132.67Support vector machine0.192.87Decision tree0.443.15Number of flower budsMultivariate linear regression0.140.59Neural network0.240.85Support vector machine0.300.72Decision tree0.450.77Number of fruiting branchesMultivariate linear regression0.130.61Neural network0.150.88Support vector machine0.220.73Decision tree0.440.78TVICotton plant heightMultivariate linear regression0.172.40Neural network0.112.14Support vector machine0.563.51Decision tree0.573.45Number of flower budsMultivariate linear regression0.150.59Neural network0.160.68Support vector machine0.790.98Decision tree0.560.84Number of fruiting branchesMultivariate linear regression0.160.60Neural network0.160.68Support vector machine0.940.99Decision tree0.570.32The results in Table2 indicated that the regression effects of two conventional VIs, DVI and CIrededge, on the cotton plant height, number of buds, and number of fruiting branches were relatively stable, with the determination fitting coefficient (R2) of above 0.5, whereas the other indexes had unstable fits to the three indexes, and the changes in the fitting indexes and methods had a significant impact on the fitting effects. The regression effect of combined spectral data was better than that of single spectral data, in which the fitting effect of VI involving the 550, 730, and 790 nm bands was better, same as single spectral data in the regression effect.


## 3.4. Regression Model of Multispectral Data of Cotton Canopy for Cotton Plant Height, Number of Fruiting Branches, Flower Buds in Different Band Combinations

In Table3, new band combinations were input into the regression model by superimposing bands with relatively good regression effects for analysis. The results indicated that the regression effect of 730 + 790 nm band combination was better than that of single bands, with regression coefficients of up to above 0.80 for cotton plant height, number of flower buds, and number of fruiting branches; the regression effect of 550 + 730 + 790 nm band combination was slightly better than that of 730 + 790 nm, suggesting that the 550 nm band had a positive effect on the fitting results. Regression was performed on the relevant indexes using the full band spectra. In the regression effect, degradation was observed compared to 730 + 790 nm and 550 + 730 + 790 nm band combinations. This suggested that the addition of 660 nm spectral band has a negative effect on regression. The 550 + 730 + 790 nm band combination and conventional VI had the same conclusion in the regression effect.Table 3
The regression table of the combinations band and the cotton of plant height, buds, and fruiting branches.
Input bandFitting indexMethodFitting resultR2RMSEP730 + 790 nmCotton plant heightMultivariate linear regression0.173.95Neural network0.913.04Support vector machine0.863.50Decision tree0.903.91Number of budsMultivariate linear regression0.460.48Neural network0.840.39Support vector machine0.800.73Decision tree0.890.30Number of fruiting branchesMultivariate linear regression0.660.49Neural network0.800.32Support vector machine0.650.89Decision tree0.900.32550 + 730+790 nmCotton plant heightMultivariate linear regression0.460.44Neural network0.950.22Support vector machine0.960.55Decision tree0.910.91Number of budsMultivariate linear regression0.460.44Neural network0.950.88Support vector machine0.960.55Decision tree0.910.98Number of fruiting branchesMultivariate linear regression0.440.89Neural network0.800.84Support vector machine0.650.18Decision tree0.910.75Full band spectraCotton plant heightMultivariate linear regression0.440.97Neural network0.870.52Support vector machine0.170.45Decision tree0.890.87Number of budsMultivariate linear regression0.460.47Neural network0.890.45Support vector machine0.180.02Decision tree0.890.38Number of fruiting branchesMultivariate linear regression0.660.49Neural network0.970.63Support vector machine0.170.11Decision tree0.890.96In terms of regression methods, both neural networks and decision trees had relatively good performance, with decision trees achieving higher correlation coefficients, lower RMSEP, and more stable regression results for multiple indexes than neural networks; support vector machine and multivariate linear regression model had general effects.


## 3.5. Band Combination Cotton Topping Index Regression Model Based on Improved Decision Tree

In terms of band combination, the 730 + 790 nm, 550 + 730 + 790 nm, and full band data were fitted using random forest and AdaBoost + decision tree methods, respectively. The fitting results were shown in Table3. The 550 + 730 + 790 nm spectral combination had better regression effects than 730 + 790 nm, indicating that 550 nm was positively correlated with the indexes in the cotton topping time, which can supplement the information of 730 and 790 nm spectral bands, whereas the full band had a worse regression effect than the 550 + 730 + 790 nm combination due to the relatively poor regression effect of 660 nm spectral band on cotton-related indexes that interfere with the regression effect. The results were shown in Table 4.Table 4
The regression of the combinations band and the cotton of plant height, buds, and fruiting branches with decision tree, random forests, and AdaBoost + decision tree.
Input bandFitting indexMethodFitting resultR2RMSEP730 + 790 nmCotton plant heightDecision tree0.900.91Random forests0.900.89AdaBoost + decision tree0.900.86Number of budsDecision tree0.890.30Random forests0.880.94AdaBoost + decision tree0.910.95Number of fruiting branchesDecision tree0.900.13Random forests0.900.79AdaBoost + decision tree0.950.99550 + 730+790 nmCotton plant heightDecision tree0.910.91Random forests0.880.51AdaBoost + decision tree0.960.40Number of flower budsDecision tree0.910.98Random forests0.810.68AdaBoost + decision tree0.840.49Number of fruiting branchesDecision tree0.910.75Random forests0.860.93AdaBoost + decision tree0.970.54Full band spectraCotton plant heightDecision tree0.890.87Random forests0.890.88AdaBoost + decision tree0.930.23Number of budsDecision tree0.890.38Random forests0.880.92AdaBoost + decision tree0.900.97Number of fruiting branchesDecision tree0.890.96Random forests0.900.97AdaBoost + decision tree0.950.52In terms of methods, among the simple regression models, the decision tree model and the neural network had better performance in the correlation coefficient of regression, with the decision tree having lower prediction RMSEP, indicating that it had a more stable prediction effect. Hence, the method was improved based on the decision tree in this paper. The decision tree model was improved on the regression model using boosting and AdaBoost methods. The boosting method improved the model fitting capacity by establishing different subsets and assigning different weights to various subsets; the AdaBoost method improved the feature extraction capacity of the model by establishing multiple regression models and assigning different weights to the regression models. The comparative analysis indicated that AdaBoost + decision tree had a better regression effect, higher correlation coefficient, lower prediction RMSEP, and stronger feature extraction capacity. As can be seen in Table5, decision tree, as a simple regression method, had the least time consumption, the time consumption of random forest was 0.69 s, and the time consumption of AdaBoost + decision tree was 0.98 s. The reason for this phenomenon was that random forest was an ensemble learning method based on bagging, each regression algorithm was trained in parallel, while in the AdaBoost method, each learning was serial, different basic regression algorithms had corresponding coefficients, and the coefficients were continuously adjusted during the training process, so the training time of AdaBoost + decision tree was longer than that of random forest. The results were shown in Table 5.Table 5
The comparison table of running time of each algorithm.
MethodRunning time/sDecision tree0.09Random forests0.69AdaBoost + decision tree0.98The 550 + 730 + 790 nm band combination had the highest fit for cotton plant height, number of buds, and number of fruiting branches, with the AdaBoost + decision tree method having the highest fitting coefficients (0.95, 0.96, and 0.84) and the lowest prediction RMSEP (0.40, 0.54, and 0.49). In the 730 + 790 nm band combination, the AdaBoost + decision tree method had the highest correlation coefficients for plant height, number of buds, and number of fruiting branches (0.90, 0.91, and 0.95). In the full band combination, the AdaBoost + decision tree method also had the highest fitting coefficients (0.93, 0.9, and 0.95) and the lowest prediction RMSEP (0.86, 0.95, and 0.99). The effects of AdaBoost + decision tree and 550 + 730 + 790 nm band combination on the predicted and measured data of cotton plant height, number of fruiting branches, and number of buds were shown in Figure4.Figure 4
Prediction of plant index during cotton topping based on AdaBoost + decision tree. (a) Prediction of cotton plant height. (b) Prediction of the number of fruiting branches. (c) Prediction of the number of flower buds.
(a)(b)(c)


## 3.6. Cotton Topping Time Determination Test

According to the requirements of cotton topping time in the Technical Guidance on Mechanized Cotton Production in Northwest Inland Cotton Growing Regions issued by the Ministry of Agriculture and Rural Affairs and related cotton planting agronomy, the appropriate topping time should be determined based on the cotton growth, plant height, number of fruiting branches, and other factors. Early topping should be performed as appropriate, and plant monitoring indexes should be determined based on the promotion of early maturity. In this paper, the topping indexes of Xinluzao 83 in Shihezi of Xinjiang were quantified according to the determined indexes in the topping time specified in the Technical Guidance after field investigation and experimental data analysis. The topping time determination indexes of this variety were determined as follows: plant height 65–70 cm, 9–11 fruiting branches, and 18–21 buds upon cotton topping.On this basis, whether to perform topping was determined based on the predicted indexes of plant height, number of fruiting branches, and number of buds according to the neural network, decision tree, random forest, and AdaBoost + decision tree methods in the 550 + 730 + 790 nm band combination. The predicted topping results are compared with the actual measured values, and the statistics of determination accuracy were shown in Table5. Table 5 indicated that the 550 + 730 + 790 nm band combination and AdaBoost + decision tree method had a better result in determining cotton topping time than the other band combinations and methods. The results were shown in Table 6.Table 6
Accuracy of cotton topping prediction based on regression model.
Input bandMethodAccuracy (%)550 + 730 + 790 nmNeural network85.14Decision tree85.23Random forests84.45AdaBoost + decision tree94.03730 + 790 nmNeural network86.39Decision tree84.17Random forests84.72AdaBoost + decision tree88.05Full band spectraNeural network87.22Decision tree85.14Random forests84.86AdaBoost + decision tree93.72According to the experimental results, the 550 + 730 + 790 nm data combined with decision tree, random forest, and AdaBoost + decision tree methods were selected to obtain the fitting models, and the model outputs were input into the topping determination model, respectively. In terms of determination accuracy, the AdaBoost + decision tree method showed a better fitting effect, and the 550 + 730 + 790 nm band combination had the best fit for cotton plant height, number of buds, and number of fruiting branches. Among them, the AdaBoost + decision tree method had the highest determination fitting coefficients (0.96, 0.84, and 0.97) and the lowest RMSEP (0.40 cm, 0.54, and 0.49). The data predicted by the model were input into the topping determination model, and the accuracy of determination was 94.03%. The topping prediction results had also corroborated that AdaBoost + decision tree was the best fitting model for cotton plant height, number of fruiting branches, and number of buds.


## 4. Discussion and Analysis

In this paper, plant indexes were determined and quantified according to the planting guideline and agronomic requirements for determining the topping time of cotton in Xinjiang. The plant height, number of fruiting branches, and number of buds were collected as indexes for determination. The multispectral information of cotton canopy during the topping time was collected to establish the analysis model. The multispectral information processing mainly included two parts: multispectral information preprocessing and spectral information processing modelling. The multispectral information was converted into reflectance by using the black and white correction method. The spectral preprocessing could reduce the interference of other factors such as experimental instruments and background and effectively improve the accuracy of information inversion interpretation. On this basis, simple regression methods such as the multivariate linear regression model, neural network, SVM, and decision tree were used to perform regression on cotton plant height, number of buds, number of fruiting branches, and other indexes based on traditional experience. The bands with good regression effects were selected for combination analysis to determine good prediction combinations and methods. The fitting results indicated that the 730 nm and 790 nm spectral bands had high correlations with cotton plant height, number of fruiting branches, and number of buds; the 550 nm band had weak correlations with the related indexes; the 660 nm spectral band had weak prediction capacity for related indexes. According to the studies in [6, 12, 13, 24, 25], the red-light band information collected from the crop canopy had better fitting effect for common indexes such as chlorophyll and leaf area index in addition to cotton plant height.In terms of regression algorithms, among the simple algorithms, decision tree, support vector machine, and neural network methods had the best performance on some indicators and band combinations; however, decision tree performed the most stability. The improved method based on ensemble learning had better feature extraction capacity for crop canopy multispectral information than the simple methods, which was corroborated in canopy monitoring of wheat and rice crops, similar to the findings in this paper [21–25]. From the performance of the ensemble algorithm, the fitting model based on AdaBoost + decision tree was better than the decision tree in fitting degree. For the random forest based on bagging, the training set is drawn from the original dataset with replacement. The datasets were independent. Uniform sampling was used, with equal weights for each sample. The AdaBoost method changed the weight of the data and adjusted the sample weight through the error rate. The higher the error rate, the greater the weight. Therefore, the AdaBoost + decision tree method had better performance in fitting degree than random forest. However, in terms of time consumption, AdaBoost + decision tree had higher time consumption than decision tree. The time consumption of both was within 1 s, and the gap between the two was about 0.3 s. In the process of field crop information collection, this time consumption was acceptable. In addition to ensemble learning methods, the use of deep learning can provide a better fit for cotton height but required a greater amount of training data [26], which is a direction for further in-depth research.In terms of model application, the model in this paper can be integrated into a multispectral unmanned aircraft hardware platform or a multispectral transmission platform, which could achieve the purpose of quickly, automatically, and accurately obtaining the plant height, number of flower buds, and fruit branches of cotton at the flower bud stage. Using the automatically obtained conclusions can provide crop indicators for the operation strategy arrangement and path planning strategy determination of intelligent plant protection machinery [27]. At the same time, the model building method proposed in this paper could be applied to monitoring the growth state of cotton or other crops in a short period of time.


## 5. Conclusions

(1)
The 550 + 730 + 790 nm band combination had a better fitting effect than the other band combinations and single bands. Among the single bands, 730 nm and 790 nm had good fitting effects on cotton plant height, number of fruiting branches, and number of buds, followed by 550 nm, which could supplement the red-light band information; 660 nm had the poorest fitting effect.(2)
The Adaboost + decision tree method was proposed for multispectral data analysis of 550 + 730+790 nm band combination. The model test results indicated that the determination coefficient of multispectral remote sensing information was 0.96 for cotton canopy and plant height, with a prediction RMSEP of 0.4 cm; 0.97 for the number of fruiting branches, with a prediction RMSEP of 0.54; 0.84 for the number of buds, with a prediction RMSEP of 0.49; the determination accuracy of the prediction results on the topping time was 94.03%.The method proposed in this paper could provide data support of crop physiological state for the determination of cotton topping time and the operation strategy of intelligent topping machinery.



---

*Source: 4214332-2022-03-24.xml*