Winter wheat yield forecasting method based on random forest regression model
By integrating multi-source data and optimizing the random forest regression model, the problems of insufficient data utilization and inadequate model parameter optimization in winter wheat yield forecasting were solved, achieving high-precision and robust yield prediction and visualization results.
Patent Information
- Application Number
- CN202511773158.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-01-27
AI Technical Summary
Existing methods for forecasting winter wheat yield rely on a single data source, fail to fully utilize multi-source data from meteorology, soil, and remote sensing, struggle to capture complex nonlinear relationships, and suffer from insufficient optimization of model parameters, resulting in inadequate prediction accuracy and robustness.
We employ a multi-source data integration, dynamic feature screening, and deep model optimization approach. By collecting meteorological, soil, and remote sensing data, we perform data cleaning and standardization, extract key features using correlation analysis and principal component analysis, construct a random forest regression model, optimize model parameters through grid search and K-fold cross-validation, and introduce a feature importance assessment mechanism for yield prediction and validation.
It achieves high-quality data fusion, accurately extracts key features, improves the model's prediction accuracy and robustness, and provides intuitive and visual output yield forecasts, enhancing its application value at the regional level.
Smart Images

Figure CN121413876A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of winter wheat yield prediction technology, specifically a method for predicting winter wheat yield based on a random forest regression model. Background Technology
[0002] Accurate forecasting of winter wheat yield is crucial for ensuring national food security, formulating agricultural policies, and guiding agricultural production. Traditional yield forecasting methods mainly rely on agricultural meteorological models, statistical models, and experience-based assessments by agronomic experts. With the development of remote sensing technology and machine learning, data-driven yield forecasting has become a research hotspot. Traditional methods often rely on a single data source and fail to fully utilize the complementary information provided by multiple sources of meteorological, soil, and remote sensing data, resulting in incomplete model information. Moreover, in feature processing, existing methods typically use simple linear correlation analysis for feature selection, which is insufficient to effectively capture the complex nonlinear relationships during crop growth. In terms of model construction, even when traditional methods employ random forest machine learning algorithms, they generally lack systematic parameter optimization and feature importance feedback mechanisms. Model hyperparameters often rely on empirical settings, affecting generalization ability and prediction stability.
[0003] Patent CN111062526B discloses a method and system for predicting winter wheat yield. The patent enables dynamic yield forecasting and allows for understanding the growth status and changes of winter wheat.
[0004] The yield estimation model established by the aforementioned patent has high applicability for estimating crop yield per unit area at the municipal and provincial levels. The estimation results are accurate and can achieve dynamic yield forecasting, which is beneficial for timely understanding of the growth status and changes of winter wheat. However, the characteristic variables are relatively simple and do not comprehensively consider the combined impact of environmental stress factors such as meteorology and soil on yield. Furthermore, the model has not been deeply optimized, and there is still room for improvement in the prediction accuracy and robustness under complex planting environments.
[0005] To this end, this application proposes a method for predicting winter wheat yield based on a random forest regression model, which is based on multi-source data fusion, dynamic feature selection, and deep model optimization. Summary of the Invention
[0006] The purpose of this invention is to provide a winter wheat yield forecasting method based on a random forest regression model, in order to solve the technical problems of existing methods mentioned in the background art, such as single data source, difficulty in capturing complex nonlinear relationships, insufficient optimization of model parameters, and unintuitive forecast results.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for winter wheat yield forecasting based on a random forest regression model, comprising multi-source data integration, dynamic feature selection, random forest model optimization, and yield prediction and validation. The multi-source dataset provides input data for dynamic feature selection, the result of dynamic feature selection serves as training features for the random forest model optimization module, and the result of random forest model optimization serves as the final yield forecast and validation. The method includes the following steps:
[0008] S1. Multi-source data integration: Collect meteorological data, soil data and remote sensing data for the winter wheat growth cycle, and perform data cleaning and standardization to provide high-quality input data;
[0009] S2. Dynamic Feature Screening: Using correlation analysis and principal component analysis, key features related to yield are extracted from the integrated data.
[0010] S3. Random Forest Model Optimization: Construct a random forest regression model, optimize the model by setting the number of decisions and the maximum depth parameter, and use cross-validation to train the model to adapt to winter wheat yield prediction.
[0011] S4. Production Forecasting and Validation: Input the data to be predicted into the trained model, output the production forecast value, and use the root mean square error and coefficient of determination to evaluate the accuracy.
[0012] Preferably, the meteorological data includes daily average temperature, cumulative precipitation and sunshine duration; the soil data includes pH value, organic matter content, soil type and humidity; the remote sensing data includes normalized difference vegetation index (NDVI), enhanced vegetation index (EVI) and leaf area index (LAI); and the data cleaning includes imputation of missing values, detection of outliers using statistical methods, and smoothing of time series data to eliminate noise.
[0013] Preferably, the correlation analysis uses Pearson correlation coefficient for linear analysis, mutual information for nonlinear relationship evaluation, sets a correlation threshold to screen highly correlated features, and then uses principal component analysis to reduce the dimensionality of the screened features and extract the main components as key features. The key features include growth degree days, precipitation distribution sequence and vegetation index change trend, which are used to reduce feature redundancy.
[0014] Preferably, the random forest model optimization adjusts the number of decisions and the maximum depth parameters through a grid search method. The number of decisions is set to a range of 50-500, and the maximum depth is set to a range of 5-50. The K-fold cross-validation method is used to evaluate the model performance and select the optimal parameter combination.
[0015] Preferably, the random forest model optimization introduces a feature importance evaluation mechanism. The feature importance evaluation mechanism outputs the importance score of each feature based on the trained random forest model, and selects a subset of features whose importance is higher than a preset threshold according to the score. The feature subset is used to optimize the input features of the model.
[0016] Preferably, the yield prediction and verification process involves inputting the preprocessed features of the region to be predicted into the trained random forest model, outputting a yield forecast value, and using the root mean square and coefficient of determination as verification indicators to compare it with the actual measured yield data, performing residual analysis and error analysis to check and quantify the forecast error.
[0017] Preferably, the missing value imputation in the data cleaning process uses linear interpolation, the outlier detection uses the Z-score method, and the time series smoothing uses the moving average method to handle missing, outlier, and fluctuating data.
[0018] Preferably, the Pearson correlation coefficient is used to assess the strength of the linear relationship between each feature and the output, and the mutual information is used to assess the nonlinear dependence between the feature and the output. By using preset linear and nonlinear correlation thresholds, a subset of features that are significantly related to the output is selected. Principal component analysis is performed on the selected features, and the principal components with a cumulative variance contribution rate of more than 85% are retained as the final input features.
[0019] Preferably, the K-fold cross-validation method randomly divides the dataset into K mutually exclusive subsets, uses K-1 subsets to train the model each time, and uses 1 subset for validation, repeating this process K times to obtain the average performance index.
[0020] Preferably, the yield forecast value is used to generate a regional yield distribution map through spatial interpolation, specifically Kriging interpolation, to visualize the spatial distribution characteristics of winter wheat yield.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] 1. This invention achieves deep fusion and high-quality preprocessing of meteorological, soil and remote sensing data by designing a multi-source data integration and cleaning module. It adopts linear interpolation, Z-score anomaly detection, moving average smoothing and Z-score standardization processes to construct a high-quality data matrix with regular structure and uniform scale. It ensures the integrity, consistency and reliability of information from the data source, provides high-quality data for training random forest regression models, and effectively solves the problems of large prediction bias and poor stability of models caused by data missing, anomalies and non-uniform scale.
[0023] 2. This invention, through the design of a dynamic feature screening mechanism that combines linear and nonlinear relationships, achieves the accurate extraction of key features most relevant to yield from high-dimensional data. By using Pearson correlation coefficient for initial screening, mutual information nonlinear evaluation, and principal component analysis for dimensionality reduction, it can not only screen features that are strongly linearly correlated with yield, but also mine nonlinear features with high information value. Finally, redundancy is eliminated through principal component analysis, which significantly improves the information density and agronomic significance of the input feature set, reduces the computational complexity of the model, and solves the problems of low model efficiency and overfitting risk caused by rough feature engineering in traditional methods. This lays the foundation for building efficient and robust prediction models.
[0024] 3. This invention achieves automatic optimization of model parameters and input features by designing a random forest model optimization mechanism that integrates grid search, K-fold cross-validation, and feature importance evaluation. It traverses parameter combinations through grid search and obtains reliable generalization error estimates through K-fold cross-validation to determine the optimal hyperparameters. After model training, feature importance evaluation based on out-of-bag error is introduced to further refine the input features, thus automating and optimizing the model tuning process. This ensures that the model maintains high accuracy and strong robustness when facing unknown data. At the same time, by removing noisy features, the interpretability and predictive ability of the model are further improved, solving the problems of blind manual parameter tuning and insufficient model generalization ability.
[0025] 4. This invention, through the design of a yield prediction and output module that combines quantitative verification and spatial visualization, realizes the transformation of county-level yield numerical forecasts into regional spatial distribution maps. After outputting the yield forecast values, rigorous quantitative verification and residual analysis are conducted using root mean square error and coefficient of determination. Spatial interpolation is used to generate continuous yield spatial distribution maps from discrete county-level forecast values. This not only quantifies the accuracy of the forecast and enhances the credibility of the results, but also transforms abstract numerical values into spatial distribution maps, intuitively demonstrating the spatial differentiation patterns of high-yield, average-yield, and low-yield areas. This solves the problems of traditional forecasting methods, such as unintuitive results presentation and difficulty in directly using them for regional disaster prevention, mitigation, and resource allocation decisions, thus enhancing their application value in precision agriculture practices. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the overall workflow of the present invention;
[0027] Figure 2 This is a flowchart of the data integration and cleaning process of the present invention;
[0028] Figure 3 This is a flowchart of the dynamic feature filtering process of the present invention;
[0029] Figure 4 This is a flowchart of the model optimization and prediction process of the present invention;
[0030] Figure 5 This is a flowchart for evaluating the feature importance of the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] Please see Figure 1 and Figure 2 This invention provides an embodiment of a method for forecasting winter wheat yield based on a random forest regression model. The meteorological data includes daily average temperature, cumulative precipitation, and sunshine duration; the soil data includes pH value, organic matter content, soil type, and moisture; the remote sensing data includes normalized difference vegetation index (NDVI), enhanced vegetation index (EVI), and leaf area index (LAI); the data cleaning includes imputation of missing values, statistical detection of outliers, and smoothing of time series data. The missing value imputation in the data cleaning process uses a linear interpolation method, the outlier detection uses the Z-score method, and the time series smoothing uses a moving average method to handle missing, outliers, and fluctuations in the data.
[0033] Furthermore, daily meteorological data for the past 5-10 growth cycles (from September of the previous year to June of the following year) of the winter wheat planting area were obtained from the National Meteorological Science Data Center. The data included average daily temperature, cumulative precipitation, and sunshine duration. Average daily temperature was the average of the highest and lowest temperatures of the day. Cumulative precipitation was the total rainfall during the growing season, reflecting the water supply to the winter wheat. Sunshine duration was the time of direct sunlight during the day, directly affecting the photosynthesis of winter wheat. Then, initial soil condition data before sowing, including pH value, organic matter content, soil type, and moisture, were obtained from the National Soil Information Service Platform. pH value is an indicator of soil acidity and alkalinity. The availability of nutrients is affected. Organic matter content is the percentage of organic matter in the soil and is the core indicator of soil fertility. Soil type is determined according to the national soil classification standard, such as clay, loam and sandy soil. Soil moisture is the water content of the soil at the time of sowing. The vegetation index is extracted from satellite image data provided by the National Satellite Meteorological Center. The normalized vegetation index is calculated through satellite remote sensing bands and is an indicator that reflects the growth status and coverage of vegetation. The calculation formula is (near infrared band - red band) / (near infrared band + red band), and the value range is [-1, 1]. The higher the index value, the more lush the vegetation. Enhanced vegetation index (EVI) and leaf area index (LAI) are obtained through remote sensing data.
[0034] Then, missing values are processed. For individual dates with missing data due to sensor malfunction, linear interpolation is used. Based on the data of the two days before and after the missing value, linear fitting is performed in chronological order to estimate the missing value. For example, if the temperature data for day N is missing, the average temperature of day N-1 and day N+1 is used to fill it in. Next, outlier detection is performed using the Z-score method. First, the average and standard deviation of each meteorological indicator, such as temperature, are calculated over the entire time series. Then, the Z-score is calculated for each data point. The Z-score formula is (data value - average) / standard deviation. Data points with an absolute Z-score greater than 3 are considered outliers and removed. Linear interpolation is then used to fill in the missing values. Finally, the time series is smoothed using the moving average method. For example, calculating... The average NDVI at five consecutive time points is used as the smoothing value in the time series to reduce random fluctuations and highlight the true trend of vegetation growth. Finally, data standardization is performed because meteorological, soil, and remote sensing data are of different orders of magnitude, and direct merging would cause the model to be biased towards features with large values. Z-score standardization is used to transform each feature data into new data with a mean of 0 and a standard deviation of 1. The calculation formula is (original value - mean of all data for this feature) / standard deviation of all data for this feature, so that all features are on the same scale. Then, all the cleaned and standardized data are tabulated and integrated using county-year as the unique identifier. Each row represents a sample, such as winter wheat growth data of a certain county in a certain year. Each column represents a feature, such as annual average temperature, cumulative precipitation in April, average NDVI at the heading stage, and soil pH value, etc., finally forming a well-structured data matrix.
[0035] Please see Figure 1 and Figure 3 This invention provides an embodiment of a method for predicting winter wheat yield based on a random forest regression model. The correlation analysis uses Pearson correlation coefficient for linear analysis and mutual information for nonlinear relationship evaluation. A correlation threshold is set to screen highly correlated features. Principal component analysis is then used to reduce the dimensionality of the screened features and extract the main components as key features. The key features include growth degree days, precipitation distribution sequence, and vegetation index change trend. Pearson correlation coefficient is used to evaluate the linear relationship strength between each feature and yield, and mutual information is used to evaluate the nonlinear dependency between features and yield. By using preset linear and nonlinear correlation thresholds, a subset of features significantly related to yield is screened. Then, principal component analysis is performed on the screened features, and principal components with a cumulative variance contribution rate of more than 85% are retained as the final input features.
[0036] Furthermore, the key feature set most relevant to winter wheat yield and with the least information redundancy is selected from the integrated data to improve model efficiency and accuracy. First, correlation analysis is performed using the Pearson correlation coefficient, a statistical indicator used to measure the strength and direction of the linear relationship between two variables. The Pearson correlation coefficient value ranges from -1 to 1, where 1 indicates a perfect positive correlation, -1 indicates a perfect negative correlation, and 0 indicates no linear correlation. The Pearson correlation coefficient is calculated by dividing the product of the covariance and standard deviation of the two variables. The Pearson correlation coefficient is calculated between each feature in the integrated data, such as average temperature, precipitation, and NDVI, and the final actual yield. For example, the correlation coefficient between NDVI at the heading stage and yield is calculated to be 0.75, indicating a strong positive correlation, while the correlation coefficient between soil pH and yield may only be 0.1, indicating a very weak correlation. Then, a threshold is set for initial screening. A correlation threshold of 0.3 is set, and all features with an absolute correlation coefficient less than 0.3 are considered weakly correlated features and are removed, quickly filtering out a large number of invalid features.
[0037] Then, we need to capture important features that have non-linear relationships with yield, such as periodic and exponential relationships. Pearson correlation coefficient cannot effectively discover these features, so mutual information calculation is required. Mutual information is an indicator in information theory that measures the degree of interdependence between two variables. It is the degree to which the uncertainty of one variable is reduced after knowing the information of another variable. Unlike Pearson correlation coefficient, which can only measure linear relationships, mutual information can capture any form of statistical dependence between variables, including non-linear relationships. In feature selection, the higher the mutual information value, the greater the potential information value of the feature for winter wheat yield. Then, a mutual information threshold is set, and features with mutual information values higher than the threshold are retained.
[0038] Finally, principal component analysis (PCA) is performed for dimensionality reduction. PCA is a dimensionality reduction algorithm that transforms multiple correlated features into a set of linearly uncorrelated new variables called principal components. Each principal component is a linear combination of the original features, with the first principal component retaining the largest variance in the original data, followed by the second. The number of principal components is then determined by observing the variance explained rate, which is the percentage of original data information retained by each principal component. The top K principal components with a cumulative variance explained rate of 85% or higher are selected. For example, if there are 20 original features, after PCA, the first 5 principal components contain more than 85% of the information. These K principal components are used as the key features for model training. Through two steps of selection and one step of dimensionality reduction, the core feature set with the highest information density is effectively extracted from high-dimensional data, eliminating redundancy while retaining key information, providing high-quality input for training an efficient and robust random forest model.
[0039] Please see Figure 1 and Figure 4 This invention provides an embodiment of a method for forecasting winter wheat yield based on a random forest regression model. The multi-source data integration involves collecting meteorological, soil, and remote sensing data throughout the winter wheat growth cycle, followed by data cleaning and standardization to provide high-quality input data. Dynamic feature selection employs correlation analysis and principal component analysis to extract key yield-related features from the integrated data. Random forest model optimization involves constructing a random forest regression model, setting the number of decisions and maximum depth parameters, and using cross-validation to optimize the model for training and adapting it to winter wheat yield forecasting. Yield forecasting and validation involve inputting the data to be predicted into the trained model, outputting the yield forecast value, and evaluating accuracy using root mean square error and coefficient of determination. The random forest model optimization adjusts the number of decisions and maximum depth parameters using a grid search method, evaluates model performance using K-fold cross-validation, and selects the optimal parameter combination.
[0040] Furthermore, a random forest regression model is constructed. Random forest regression is a learning algorithm that obtains the final prediction by constructing a decision tree and averaging the prediction results. A decision tree is a tree-structured prediction model where each internal node represents a feature decision, each branch represents a decision result, and each leaf node represents a predicted value. The number and depth of decisions are then set. Too few decisions may lead to underfitting, while too many decisions increase computational cost. The number of decisions is set to 250, and the maximum depth of the decision tree is set to 25. Finally, the generalization ability of the model is reliably evaluated using K-fold cross-validation. K-fold cross-validation is a method that uses the obtained key features... The dataset is randomly shuffled and then divided into K non-overlapping subsets. In the i-th round, the i-th subset is used as the validation set to evaluate the model performance. The remaining K-1 subsets are combined as the training set to train the model. In each round, a performance metric is calculated on the validation set. Finally, the average of the K performance metrics obtained from the K rounds of validation is used as the error estimate of the model under the current hyperparameter configuration. K-fold cross-validation can make the most of the limited data for training and validation, making the performance evaluation results more stable and reliable than the method of dividing the training set and test set in a single step. It can effectively prevent the model from being greatly biased due to accidental data partitioning.
[0041] Based on the completion of parameter space definition and K-fold cross-validation mechanism establishment, grid search optimization is performed. Grid search optimization can systematically traverse all preset parameter combinations and perform a complete K-fold cross-validation process for each combination to obtain a stable generalization error estimate. By comparing the average performance index of all parameter combinations in cross-validation, the hyperparameter configuration with the best generalization ability is finally selected. The hyperparameter configuration with the best generalization ability is the parameter configuration with the smallest average prediction error and the smallest performance fluctuation on the validation set, thereby completing the core parameter optimization of the random forest model and laying the foundation for subsequent accurate prediction.
[0042] Please see Figure 1 , Figure 4 and Figure 5 The present invention provides an embodiment of a method for predicting winter wheat yield based on a random forest regression model. The random forest model optimization introduces a feature importance evaluation mechanism. The feature importance evaluation mechanism outputs the importance scores of each feature based on the trained random forest model. The feature subset with importance higher than a preset threshold is selected according to the score ranking. The feature subset is used to optimize the input features of the model.
[0043] Furthermore, using the optimal hyperparameters obtained through grid search, a final random forest model is retrained on all training data. The random forest model has a built-in feature importance evaluation mechanism. For each decision tree in the random forest model, the feature importance evaluation mechanism uses out-of-bag samples to evaluate the model's prediction accuracy. Out-of-bag samples are samples that were not selected during tree construction. Then, the values of a certain feature are randomly shuffled, and the accuracy is evaluated again using out-of-bag samples. If the feature is very important, shuffling its value will cause a significant drop in model accuracy. The average of this accuracy drop is normalized across all trees to obtain the importance score of the feature. Then, all features are sorted from high to low according to their importance scores, and a bar chart is generated for visualization, intuitively showing the important features driving the model's prediction. Then, a threshold is set based on the importance scores, for example, only the top N most important features are retained. Then, using a subset of the selected features, the model training and tuning process is re-executed, removing unimportant features, reducing noise interference, and further improving the model's prediction accuracy and robustness.
[0044] Please see Figure 1 , Figure 4 and Figure 5The present invention provides an embodiment of a method for forecasting winter wheat yield based on a random forest regression model. The yield prediction and verification process involves inputting preprocessed features of the region to be predicted into a trained random forest model, outputting a yield forecast value, and using root mean square and coefficient of determination as verification indicators. The forecast value is compared with actual measured yield data, and residual analysis and error analysis are performed to check the forecast error. The yield forecast value is used to generate a regional yield distribution map through spatial interpolation, specifically Kriging interpolation, to visualize the spatial distribution characteristics of winter wheat yield.
[0045] Furthermore, meteorological, soil, and remote sensing data of the areas to be predicted, such as counties and districts, are collected and input into the random forest regression model that has completed final training and optimization. Each decision tree in the random forest regression model makes an independent prediction and outputs an initial yield prediction value. The final yield forecast value is the simple arithmetic mean of the initial prediction values of all decision trees. Finally, the random forest regression model outputs the final yield forecast value for the areas to be predicted. After the actual winter wheat harvest, the actual measured yield data of each prediction area are obtained through agricultural statistics departments as a verification benchmark. Then, the root mean square error and coefficient of determination are used to quantitatively evaluate the forecast results. The root mean square error measures the average error between the predicted value and the measured value. The unit is the same as the yield. The smaller the root mean square error value, the more accurate the forecast. The coefficient of determination measures the model's ability to explain the actual fluctuations in yield. The closer the coefficient of determination value is to 1, the stronger the predictive ability.
[0046] Then, the prediction residuals are calculated, which are the measured values minus the predicted values. The distribution of the residuals is analyzed. If the residuals show a random distribution, it indicates that the model performance is good. Then, the discrete county-level forecast results are transformed into continuous information. The spatialized yield level distribution map of the entire region is generated by using the Kriging interpolation method to obtain the yield forecast values of each county. The Kriging interpolation method is a spatial statistical method used to predict the values of unknown regions based on the values of known discrete points. It can not only predict the distance between points and known points, but also construct the optimal prediction model by analyzing the spatial autocorrelation between known points, generating a smooth prediction surface, and at the same time providing an error estimate of the prediction results. The final yield distribution map can intuitively show the spatial distribution of high-yield, average-yield, and low-yield areas, realizing accurate forecasting of winter wheat yield. Agricultural departments can use the distribution map to identify areas at risk of reduced yield in advance and formulate precise disaster relief and subsidy policies. Grain enterprises and storage and transportation departments can use the distribution map to optimize the layout of procurement, storage, and logistics.
[0047] Working principle: First, meteorological data, soil data, and remote sensing data are collected. The data are cleaned and standardized. Missing values are filled in using linear interpolation. Outliers are detected and removed using the Z-score method. Time series data are smoothed using the moving average method. Finally, Z-score standardization is used to bring all features to the same scale, forming a high-quality input data matrix.
[0048] Then, the dynamic feature selection stage is entered. Pearson correlation coefficient and mutual information analysis are used to evaluate the linear and nonlinear relationships between features and yield, respectively. Thresholds are set to initially screen highly correlated features. Principal component analysis is then used to reduce the dimensionality of the selected features. Principal components with a cumulative variance contribution rate of more than 85% are retained as key features, such as growth degree days, precipitation distribution sequences and vegetation index change trends. This can effectively reduce feature redundancy and improve the information density of the model input.
[0049] In the random forest model optimization stage, the number and maximum depth of decision trees are adjusted by grid search, K-fold cross-validation is used to evaluate the generalization performance of each parameter combination, and the optimal configuration is selected. At the same time, a feature importance evaluation mechanism is introduced, and the score of each feature is calculated based on the change in the accuracy of out-of-bag samples. A subset of features with high importance is selected for secondary training to further enhance the prediction accuracy and robustness of the model.
[0050] Finally, in the yield prediction and verification stage, the preprocessed features of the region to be predicted are input into the optimized model, the yield forecast value is output, and it is compared with the actual harvest yield data. The root mean square error and coefficient of determination are used to quantitatively evaluate the forecast accuracy. Then, a regional yield distribution map is generated by spatial interpolation to intuitively show the spatial differences in yield. This provides a reliable basis for risk identification, resource allocation and policy formulation in the agricultural sector, and realizes the scientific and visual forecasting of winter wheat yield.
[0051] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for winter wheat yield forecasting based on a random forest regression model, comprising multi-source data integration, dynamic feature selection, random forest model optimization, and yield prediction and validation, wherein the multi-source dataset provides input data for dynamic feature selection, the result of dynamic feature selection serves as training features for the random forest model optimization module, and the result of random forest model optimization serves as the final yield forecast and validation, characterized in that: The method includes the following steps: S1. Multi-source data integration: Collect meteorological data, soil data and remote sensing data for the winter wheat growth cycle, and perform data cleaning and standardization to provide high-quality input data; S2. Dynamic Feature Screening: Using correlation analysis and principal component analysis, key features related to yield are extracted from the integrated data. S3. Random Forest Model Optimization: Construct a random forest regression model, optimize the model by setting the number of decisions and the maximum depth parameter, and use cross-validation to train the model to adapt to winter wheat yield prediction. S4. Production Forecasting and Validation: Input the data to be predicted into the trained model, output the production forecast value, and use the root mean square error and coefficient of determination to evaluate the accuracy.
2. The method for predicting winter wheat yield based on a random forest regression model according to claim 1, characterized in that: The meteorological data includes daily average temperature, cumulative precipitation, and sunshine duration; the soil data includes pH value, organic matter content, soil type, and humidity; the remote sensing data includes Normalized Difference Vegetation Index (NDVI), Enhanced Vegetation Index (EVI), and Leaf Area Index (LAI); the data cleaning process includes imputation for missing values, statistical detection for outliers, and smoothing of the time series data to eliminate noise.
3. The method for predicting winter wheat yield based on a random forest regression model according to claim 1, characterized in that: The correlation analysis uses Pearson correlation coefficient for linear analysis and mutual information for nonlinear relationship evaluation. A correlation threshold is set to screen highly correlated features. Principal component analysis is then used to reduce the dimensionality of the screened features and extract the main components as key features. Key features include growth degree days, precipitation distribution sequences, and vegetation index change trends to reduce feature redundancy.
4. The method for predicting winter wheat yield based on a random forest regression model according to claim 1, characterized in that: The random forest model optimization adjusts the number of decisions and maximum depth parameters using a grid search method. The number of decisions is set to a range of 50-500, and the maximum depth is set to a range of 5-50. The K-fold cross-validation method is used to evaluate the model performance and select the optimal parameter combination.
5. The method for predicting winter wheat yield based on a random forest regression model according to claim 4, characterized in that: The random forest model optimization introduces a feature importance evaluation mechanism. The feature importance evaluation mechanism outputs the importance score of each feature based on the trained random forest model, and selects a subset of features whose importance is higher than a preset threshold according to the score. The feature subset is used to optimize the input features of the model.
6. The method for predicting winter wheat yield based on a random forest regression model according to claim 1, characterized in that: The yield prediction and validation process involves inputting the preprocessed features of the region to be predicted into the trained random forest model, outputting the yield forecast value, and using the root mean square and coefficient of determination as validation indicators. The forecast is compared with the actual measured yield data, and residual analysis and error analysis are performed to check and quantify the forecast error.
7. The method for predicting winter wheat yield based on a random forest regression model according to claim 2, characterized in that: The missing value imputation in the data cleaning process uses a linear interpolation method, the outlier detection uses the Z-score method, and the time series smoothing uses the moving average method to handle missing, outlier, and fluctuating data.
8. The method for predicting winter wheat yield based on a random forest regression model according to claim 3, characterized in that: The Pearson correlation coefficient is used to assess the strength of the linear relationship between each feature and output, and mutual information is used to assess the nonlinear dependence between features and output. By using preset linear and nonlinear correlation thresholds, a subset of features that are significantly related to output is selected. Principal component analysis is performed on the selected features, and principal components with a cumulative variance contribution rate of more than 85% are retained as the final input features.
9. The method for predicting winter wheat yield based on a random forest regression model according to claim 4, characterized in that: The K-fold cross-validation method randomly divides the dataset into K mutually exclusive subsets. Each time, K-1 subsets are used to train the model, and 1 subset is used for validation. This process is repeated K times and the average performance index is taken.
10. The method for predicting winter wheat yield based on a random forest regression model according to claim 6, characterized in that: The yield forecast values are used to generate regional yield distribution maps using spatial interpolation, specifically Kriging interpolation, which is used to visualize the spatial distribution characteristics of winter wheat yield.
Citation Information
Cited By
Data set construction method and device for prevention and treatment of occupational hearing loss
CN122177500A
Winter wheat growth prediction method based on multi-source monitoring data
CN122311570A
A Method for Predicting Winter Wheat Growth Based on Multi-Source Monitoring Data
CN122311570B
