Cargo volume prediction method and system based on gradient boosting decision tree and neural network
By using the gradient boosting decision tree model to construct leaf node features and replace high-dimensional category features in cargo volume prediction, the problem of low cargo volume prediction accuracy caused by data sparseness in the existing technology is solved, and higher cargo volume prediction is achieved. Accuracy.
Patent Information
- Application Number
- CN202111499805.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-12-09
AI Technical Summary
The existing machine learning-based cargo volume prediction method is not very accurate in handling high-dimensional category features due to sparse data.
By using the pre-trained gradient boosting decision tree model to construct leaf node features, replace the high-dimensional category features in the feature data, and then input them into the neural network model for cargo volume prediction.
It effectively overcomes the problem of data sparseness after one-hot encoding of high-dimensional category features and improves the accuracy of cargo volume prediction.
Smart Images

Figure CN114169612B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cargo volume prediction, and in particular to a cargo volume prediction method and system based on a gradient boosting decision tree and a neural network. Background Art
[0002] Cargo volume refers to the weight or number of pieces of cargo to be transported every day, and is an important basis for the daily operation and management of logistics companies. Transport capacity resources refer to the means of transportation owned by logistics companies, such as trucks, cargo planes and other resources. For logistics companies, cargo volume can be regarded as the demand for transport capacity resources, and transport capacity resources can be regarded as the supply to meet the demand for cargo transportation. The precise matching relationship between transport capacity resources (supply) and cargo volume (demand) is of great significance to optimizing the timeliness of cargo transportation, improving service quality and reducing operating costs. In the logistics industry, it is usually necessary to allocate transport capacity resources before the cargo volume is determined. Therefore, it is necessary to predict the demand for cargo volume in a certain period of time in the future in advance and allocate transport capacity resources in advance accordingly.
[0003] The existing cargo volume prediction methods mainly include machine learning-based methods. Machine learning-based methods regard cargo volume prediction as a regression problem. By collecting different features of each operation day, such as the originating transshipment center, the destination transshipment center, weather conditions, whether it is a holiday, yesterday's cargo volume, and the actual cargo volume of the day, a model that maps these data features to cargo volume values is trained through these historical data. In order to more accurately learn the mapping relationship between features and cargo volume values and reduce the phenomenon of overfitting, machine learning-based methods require a large amount of data support. In actual applications, there are many flow directions in the logistics network (the goods sent from the originating transshipment center to the destination transshipment center are called a "flow direction"), but the historical data of each flow direction is limited, which is not enough to support the training of a machine learning model for each flow direction to predict the cargo volume of each flow direction. Therefore, the existing machine learning-based cargo volume prediction methods use the flow direction as a categorical feature to participate in the model training. However, since neural networks cannot directly process categorical features, the categorical features need to be processed into numerical features through unique hot encoding before model training. Neural network models are good at describing the numerical relationship between features and cargo volume. However, after one-hot encoding the high-dimensional category feature of flow, the data becomes sparse, which is not conducive to the training of the neural network model and directly affects the model's cargo volume prediction accuracy. Summary of the invention
[0004] The present invention aims to improve the accuracy of cargo volume prediction and provides a cargo volume prediction method and system based on a gradient boosting tree and a neural network.
[0005] To achieve this object, the present invention adopts the following technical solutions:
[0006] A method for predicting cargo volume based on a gradient boosting decision tree and a neural network is provided, the steps comprising:
[0007] S1, construct the leaf node features of each decision tree using the pre-trained gradient boosting decision tree model T with the acquired feature data X;
[0008] S2, after replacing the high-dimensional category features in the feature data X with the leaf node features, feature data X′ is obtained;
[0009] S3, input the feature data X′ into the pre-trained neural network model M to perform cargo volume prediction, and output the prediction result.
[0010] Preferably, the feature data X includes the weather conditions on the freight day, feature data of whether it is a holiday, and the high-dimensional category features.
[0011] Preferably, the high-dimensional category features include feature data of the originating transshipment center and feature data of the destination transshipment center.
[0012] Preferably, the method steps for training the neural network model M include:
[0013] S31, dividing the feature data X and the actual cargo volume data Y corresponding to X in the history of N days into a training set and a validation set, wherein the feature data X and the actual cargo volume data Y corresponding to X in the training set are respectively denoted as X train , Y train The feature data X in the validation set and the actual cargo volume data Y corresponding to X are respectively denoted as X valid , Y valid ;
[0014] S32, X train , X valid All samples in construct leaf node features of each sample in each decision tree through the gradient boosting decision tree model T;
[0015] S33, replace X with the leaf node feature corresponding to the high-dimensional category feature train , X valid The corresponding high-dimensional category features are obtained by train , X′ valid ;
[0016] S34, with X′ train and Y train is a training sample, trained to form the neural network model M;
[0017] S35, X′ valid Input into the neural network model M, the model M predicts the output X' valid Corresponding cargo volume forecast
[0018] S36, according to X′ valid The corresponding Y valid and the cargo volume forecast Calculate the prediction error of model M and determine whether the prediction error is less than the preset error threshold.
[0019] If yes, terminate the iterative training of the neural network model M and output the neural network model M;
[0020] If not, the training parameters of the neural network model M are adjusted, and the process returns to step S34 to continue iteratively training the neural network model M.
[0021] Preferably, N=800.
[0022] Preferably, the feature data X of N′ day in the historical N days and the cargo volume data Y corresponding to X are selected as the validation set of the neural network model M, 0.05N≤N′≤0.1N.
[0023] The present invention also provides a cargo volume prediction system based on a gradient boosting decision tree and a neural network, which can implement the cargo volume prediction method. The cargo volume prediction system includes:
[0024] The leaf node feature construction module is used to construct the leaf node features of each decision tree using the pre-trained gradient boosting decision tree model T with the acquired feature data X;
[0025] A feature replacement module is connected to the leaf node feature construction module and is used to replace the corresponding high-dimensional category features in the feature data X with the leaf node features to obtain feature data X′ and output it.
[0026] The cargo volume prediction module is connected to the feature replacement module and is used to input the feature data X′ output by the feature replacement module into the pre-trained neural network model M to perform cargo volume prediction and output the prediction result.
[0027] Preferably, the cargo volume forecasting system further includes:
[0028] The model training module is used to train the neural network model M using the feature data X′ and the actual cargo volume data Y corresponding to X′ as training samples. The model training module specifically includes:
[0029] The sample set division unit is used to divide the acquired feature data X and the actual cargo volume data Y corresponding to X in the historical N days into a training set and a verification set, wherein the feature data X and the actual cargo volume data Y corresponding to X in the training set are respectively recorded as X train , Y trainThe feature data X in the validation set and the actual cargo volume data Y corresponding to X are respectively recorded as valid , Y valid ;
[0030] The leaf node feature construction unit is connected to the sample set partitioning unit and is used to convert X train , X valid All samples in construct leaf node features of each sample in each decision tree through the gradient boosting decision tree model T;
[0031] A feature replacement unit, connected to the leaf node feature construction unit and the sample set division unit, is used to replace X with the leaf node feature. train , X valid The corresponding high-dimensional category features are obtained by train , X′ valid ;
[0032] A model training unit, connected to the feature replacement unit, for replacing X′ train and Y train is a training sample, trained to form the neural network model M;
[0033] A model performance verification unit, connected to the model training unit and the feature replacement unit, for converting X′ valid Input into the neural network model M, the neural network model M predicts the output X' valid Corresponding cargo volume forecast And according to X′ valid The corresponding Y valid and the cargo volume forecast Calculate the prediction error of the neural network model M, and then determine whether the prediction error is less than a preset error threshold,
[0034] If yes, a termination model iterative training instruction is sent to the model training unit, and the model training unit terminates the iterative training of the neural network model M after receiving the instruction;
[0035] If not, a continuing iterative training instruction is sent to the model training unit. After receiving the instruction, the model training unit adjusts the model training parameters to X′ train and Y train For training samples, continue to iteratively train the neural network model M.
[0036] The present invention takes advantage of the decision tree model's ability to directly process category features, constructs leaf node features of all samples through a pre-trained gradient boosting decision tree, and replaces the corresponding high-dimensional category features in the feature data X with the leaf node features, thereby overcoming the problem of the accuracy of cargo volume prediction of the neural network model being affected by data sparsity, which is caused by directly training the neural network model after one-hot encoding the high-dimensional category features in the past. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 It is a diagram of the implementation steps of a method for predicting cargo volume based on a gradient boosting decision tree and a neural network provided by an embodiment of the present invention;
[0039] Figure 2 is a step diagram of a method for training a neural network model M provided by an embodiment of the present invention;
[0040] Figure 3 It is a structural schematic diagram of a cargo volume prediction system based on a gradient boosting decision tree and a neural network provided by an embodiment of the present invention;
[0041] Figure 4 It is a schematic diagram of the internal structure of the model training module in the cargo volume prediction system;
[0042] Figure 5 It is a logical block diagram for predicting cargo volume through the neural network model M after replacing high-dimensional category features with leaf features;
[0043] Figure 6 This is a schematic diagram of the structure of the gradient boosting decision tree model;
[0044] Figure 7 It is a schematic diagram of the gradient boosting decision tree model constructing leaf node features. DETAILED DESCRIPTION
[0045] The technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.
[0046] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on this patent; in order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0047] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "inner", "outer", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as a limitation on this patent. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0048] In the description of the present invention, unless otherwise clearly specified and limited, if the term "connection" or the like appears to indicate the connection relationship between components, the term should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two components or the interaction relationship between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0049] The logistics network can be viewed as a network consisting of transshipment center nodes and lines connecting different transshipment center nodes. Specifically, the transshipment center is the node where goods are transferred. Each order of goods has an originating transshipment center and a destination transshipment center. Goods are transported from the originating transshipment center to the destination transshipment center, indicating that the "flow direction" of the goods is from the originating transshipment center to the destination transshipment center.
[0050] The operation of the logistics network has a certain cycle. Generally speaking, the span of a cycle is 24 hours, which is called an operation day. On each operation day, a transportation resource dispatch is carried out to deliver the goods arriving on that operation day to the destination transfer center. Since transportation resource dispatch generally needs to be carried out before the end of the operation day, it is still impossible to determine how many goods will arrive on that operation day. Therefore, it is necessary to predict the cargo volume in all directions of the entire network before the end of the operation day, and dispatch the transportation resource for that operation day accordingly. Accurate cargo volume forecasting helps to accurately allocate transportation resources, so that all goods can be transported without leaving transportation resources idle.
[0051] At present, the prediction of cargo volume mostly adopts machine learning methods. The method based on machine learning regards cargo volume prediction as a regression problem. By collecting different feature data of each historical operation day (such as the origin transfer center, the destination transfer center, weather conditions, whether it is a holiday, etc.), a model that maps these features to cargo volume values is trained. In order to more accurately learn the mapping relationship between features and cargo volume values and reduce overfitting, the cargo volume prediction method based on machine learning requires a large amount of training data support. Although the number of flow directions in the logistics network is large (generally the square of the number of transfer centers), the historical cargo volume data of each flow direction is actually very limited, which is not enough to support the training of a machine learning model for each flow direction. Therefore, in the prior art, the flow direction is used as a categorical feature to participate in the training of the neural network model. Although the neural network model is good at describing the mapping relationship between features and cargo volume, since the neural network cannot directly process categorical features, the categorical features need to be processed into numerical features by one-hot encoding before training. However, after one-hot encoding, the feature data becomes sparse and does not utilize the training of the neural network model. To this end, an embodiment of the present invention provides a cargo volume prediction method based on a gradient boosting decision tree and a neural network to overcome the problem of data sparsity affecting the cargo volume prediction accuracy of the neural network model, which is caused by directly training the neural network model after one-hot encoding of high-dimensional category features.
[0052] To solve this technical problem, the implementation logic of the technical solution we provide is as follows: Figure 5 As shown in the figure, a new end-to-end model is obtained by grafting the gradient boosting decision tree model and the neural network model. The first step of the new model is to train the gradient boosting decision tree model with all the data samples. Since the ability of the gradient boosting decision tree model to describe the mapping relationship between features and cargo volume is not as good as that of the neural network model, we do not use the gradient boosting decision tree model to predict cargo volume, but to construct new features of the samples through the gradient boosting decision tree, and use these new features to replace the original high-dimensional category features; the second step is to train the neural network model on the new feature set. The end-to-end model has the ability to directly process high-dimensional category features and is good at capturing the mapping relationship between features and cargo volume.
[0053] Before training the end-to-end model (including the gradient boosting decision tree model T and the neural network model M, the gradient boosting decision tree model T replaces the high-dimensional category features in the input feature data X with leaf node features and outputs feature data X′ as the input of the neural network model M, and the neural network model M predicts the cargo volume based on the input data), we need to obtain historical data from the database. The historical data includes the feature data X of all flows in the past N days and the actual cargo volume data Y corresponding to X. The feature data X includes the weather conditions on the day of the freight, whether it is a holiday, and high-dimensional category feature data. The high-dimensional category feature data includes the feature data of the origin transshipment center and the feature data of the destination transshipment center.
[0054] X is a matrix with P rows and F columns. Each row is a sample point, which represents all the features of a certain flow on a certain day (the features include the weather conditions on the day of the freight, whether it is a holiday, the data features of the originating transshipment center and the destination transshipment center, etc.). Each column is a set of feature values, which represents the value of all sample points in this feature. Y is a vector of length P, and each element in the vector represents the actual cargo volume of a certain flow on a certain day in history. A larger N includes more information, which can reduce the phenomenon of model overfitting and improve the generalization ability of the model. Therefore, we prefer N = 800.
[0055] Since the acquired historical feature data X and actual cargo volume data Y may contain missing values or values that are seriously deviated from the actual values, it is necessary to select the zero-filling method or the mean-filling method to fill the missing values according to the characteristics of different features. For outliers that are seriously deviated from the actual values, the outliers can be removed by trimming the outliers or discarding the sample points where the outliers are located. By filling in missing values and processing outliers, high-quality historical feature data X and actual cargo volume data Y can be obtained.
[0056] In order to evaluate the quality of the model in time during the training process, the historical feature data X and the actual cargo volume data Y after missing value filling and outlier processing are divided into two parts: training set and validation set. Preferably, we select the historical feature data X and the actual cargo volume data Y of the N'th day closest to the current day in the historical N days as validation data to form a validation set, and the feature data X in the validation set and the actual cargo volume data Y corresponding to X are respectively recorded as X valid , Y valid The remaining NN′ days of data are used as training data to form a training set. The feature data X in the training set and the actual cargo volume data Y corresponding to X are recorded as X train , Y train Preferably, 0.05N≤N′≤0.1N.
[0057] After obtaining the model training data, we first train the gradient boosting decision tree model on all the training data. The gradient boosting decision tree model consists of a set T of decision trees, such as Figure 6 As shown, each leaf node l of each decision tree carries a numerical value, which is the predicted value of the decision tree for the sample falling into the leaf node. In practice, the C4.5 algorithm or the CART algorithm is usually used to guide the splitting of the decision tree.
[0058] A sample makes a decision on |T| trees and falls into |T| leaf nodes respectively. The i-th tree T i There are i leaf nodes, then according to the sample in T i The leaf node position that falls on the top gets a length of n i A 0-1 sequence, each element of which corresponds to T i A leaf node of , and the sequence element corresponding to the leaf node where the sample falls is "1", otherwise it is "0". Figure 7 For example, a sample is "a batch of goods was sent from Transshipment Center No. 1 to Transshipment Center No. 3 on a certain weekend in history", and the sample falls into Figure 7 In the leaf node l1, the value of l1 is "1". For this sample, the values of other leaf nodes l2, l3, and l4 are "0". Then the leaf node feature constructed by the gradient boosting decision tree model for this sample on this decision tree is "1000".
[0059] X valid , X train After all samples in the gradient boosting decision tree construct the leaf node features corresponding to each sample, X valid , X train After replacing the data features of the originating transshipment center and the destination transshipment center with the corresponding constructed leaf node features, we can obtain X′ train , X′ valid .
[0060] Then X′ train and X′ train The corresponding Y train For training samples, a fully connected neural network model M is trained using the back propagation algorithm. The number of hidden layers and the number of neurons in each layer of the neural network model M are selected according to the actual feature dimension and number of samples. In our scenario, a neural network with two hidden layers is selected, and the number of neurons in each layer is 256 and 64 respectively.
[0061] Finally, the performance of the end-to-end model is evaluated using the following method:
[0062] First, X′ validInput to the neural network model M, model M predicts the output of the cargo volume forecast value Then according to X′ valid The corresponding Y valid and cargo volume forecast Calculate the prediction error (there are many existing prediction error methods, such as calculating Y valid and The difference between the prediction error and the error threshold is used as the prediction error, etc.
[0063] If yes, terminate the iterative training of the neural network model M and output the neural network model M;
[0064] If not, the training parameters of the neural network model M are adjusted, and the neural network model M is continuously iterated.
[0065] In summary, this embodiment provides a method for predicting cargo volume based on a gradient boosting decision tree and a neural network, such as Figure 1 As shown, the implementation steps specifically include:
[0066] Step S1, constructing the leaf node features of each decision tree using the pre-trained gradient boosting decision tree model T using the acquired feature data X;
[0067] S2, after replacing the high-dimensional category features in the feature data X with the leaf node features, the feature data X′ is obtained;
[0068] S3, input the feature data X′ into the pre-trained neural network model M to predict the cargo volume, and output the prediction result.
[0069] The method of training the neural network model M in this embodiment is as follows: Figure 2 As shown, specifically including:
[0070] S31, the feature data X and the actual cargo volume data Y corresponding to X in the historical N days are divided into a training set and a validation set, and the feature data X in the training set and the actual cargo volume data Y corresponding to X are respectively recorded as X train , Y train ; The feature data X in the validation set and the actual cargo volume data Y corresponding to X are respectively recorded as valid , Y valid ;
[0071] S32, X train , X valid All samples in are constructed through the gradient boosting decision tree model T to construct the leaf node features of each sample in each decision tree;
[0072] S33, replace X with the leaf node features corresponding to the high-dimensional category features train , Xvalid The corresponding high-dimensional category features are obtained by train , X′ valid ;
[0073] S34, with X′ train and Y train is a training sample, which is trained to form a neural network model M;
[0074] S35, X′ valid Input into the neural network model M, model M predicts the output X′ valid Corresponding cargo volume forecast
[0075] S36, according to X′ valid The corresponding Y valid and cargo volume forecast Calculate the prediction error of model M and determine whether the prediction error is less than the preset error threshold.
[0076] If yes, terminate the iterative training of the neural network model M and output the neural network model M;
[0077] If not, the training parameters of the neural network model M are adjusted, and the process returns to step S34 to continue iteratively training the neural network model M.
[0078] The present invention also provides a cargo volume prediction system based on gradient boosting decision tree and neural network, which can realize the above cargo volume prediction method, such as Figure 3 As shown, the cargo volume forecasting system includes:
[0079] The leaf node feature construction module is used to construct the leaf node features of each decision tree using the pre-trained gradient boosting decision tree model T with the acquired feature data X;
[0080] A feature replacement module, connected to the leaf node feature construction module, is used to replace the corresponding high-dimensional category features in the feature data X with the leaf node features to obtain and output the feature data X′;
[0081] A model training module is used to train a neural network model M using the feature data X′ and the actual cargo volume data Y corresponding to X′ as training samples;
[0082] The cargo volume prediction module is connected to the feature replacement module and the model training module respectively, and is used to input the feature data X′ output by the feature replacement module into the neural network model M to perform cargo volume prediction and output the prediction result.
[0083] The specific internal structure of the model training module is as follows Figure 4 As shown, including:
[0084] The sample set division unit is used to divide the acquired feature data X and the actual cargo volume data Y corresponding to X in the historical N days into a training set and a validation set. The feature data X in the training set and the actual cargo volume data Y corresponding to X are respectively recorded as X train , Y train ; The feature data X in the validation set and the actual cargo volume data Y corresponding to X are respectively recorded as valid , Y valid ;
[0085] Leaf node feature construction unit, connected to the sample set partitioning unit, is used to convert X train , X valid All samples in are constructed through the gradient boosting decision tree model T to construct the leaf node features of each sample in each decision tree;
[0086] The feature replacement unit connects the leaf node feature construction unit and the sample set partitioning unit to replace X with the leaf node feature. train , X valid The corresponding high-dimensional category features are obtained by train , X′ valid ;
[0087] Model training unit, connected to feature replacement unit, used to replace X′ train and Y train is a training sample, trained to form the neural network model M;
[0088] The model performance verification unit connects the model training unit and the feature replacement unit to convert X′ valid Input into the neural network model M, the neural network model M predicts the output X′ valid Corresponding cargo volume forecast And according to X′ valid The corresponding Y valid and cargo volume forecast Calculate the prediction error of the neural network model M, and then determine whether the prediction error is less than the preset error threshold.
[0089] If yes, a termination model iterative training instruction is sent to the model training unit, and the model training unit terminates the iterative training of the neural network model M after receiving the instruction;
[0090] If not, a continuing iterative training instruction is sent to the model training unit. After receiving the instruction, the model training unit adjusts the model training parameters to X′ train and Y train For training samples, continue to iteratively train the neural network model M.
[0091] In summary, the present invention grafts the gradient boosting decision tree model and the neural network model, so that the gradient boosting decision tree model is used at the data input end to directly process high-dimensional category features and perform feature combination, and the neural network model is used at the output end to capture the complex quantitative relationship between feature data and cargo quantity, thereby overcoming the problem of inaccurate cargo quantity prediction of the model caused by data sparsity caused by one-hot encoding of high-dimensional category features in the prior art.
[0092] It should be noted that the above specific implementations are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art should understand that various modifications, equivalent substitutions, changes, etc. can be made to the present invention. However, as long as these changes do not deviate from the spirit of the present invention, they should be within the scope of protection of the present invention. In addition, some terms used in the specification and claims of this application are not restrictive, but are only for the convenience of description.
Claims
1. A method for predicting cargo volume based on gradient boosting decision tree and neural network, characterized in that the steps include: S1, construct the leaf node features of each decision tree using the pre-trained gradient boosting decision tree model T with the acquired feature data X; S2, after replacing the high-dimensional category features in the feature data X with the leaf node features, feature data X′ is obtained; S3, the feature data X ′ Input into the pre-trained neural network model M to predict the cargo volume and output the prediction result; The feature data X includes the weather conditions on the day of the freight, feature data of whether it is a holiday, and the high-dimensional category features; The high-dimensional category features include feature data of the originating transshipment center and feature data of the destination transshipment center.
2. The cargo volume prediction method based on gradient boosting decision tree and neural network according to claim 1 is characterized in that: The method steps for training the neural network model M include: S31, dividing the feature data X and the actual cargo volume data Y corresponding to X in the history of N days into a training set and a validation set, wherein the feature data X and the actual cargo volume data Y corresponding to X in the training set are respectively denoted as X train , Y train The feature data X in the validation set and the actual cargo volume data Y corresponding to X are respectively denoted as X valid , Y valid ; S32, X train , X valid All samples in construct leaf node features of each sample in each decision tree through the gradient boosting decision tree model T; S33, replace X with the leaf node feature corresponding to the high-dimensional category feature train , X valid The corresponding high-dimensional category features are obtained by train , X′ valid ; S34, with X′ train and Y train is a training sample, trained to form the neural network model M; S35, X′ valid Input into the neural network model M, the model M predicts the output X' valid Corresponding cargo volume forecast S36, according to X′ valid The corresponding Y valid and the cargo volume forecast Calculate the prediction error of model M and determine whether the prediction error is less than the preset error threshold. If yes, terminate the iterative training of the neural network model M and output the neural network model M; If not, the training parameters of the neural network model M are adjusted, and the process returns to step S34 to continue iteratively training the neural network model M.
3. The cargo volume prediction system based on gradient boosting decision tree and neural network according to claim 2 is characterized in that: N=800。 4. The cargo volume prediction system based on gradient boosting decision tree and neural network according to claim 2 or 3, characterized in that: The feature data X of N′ days in the historical N days and the cargo volume data Y corresponding to X are selected as the validation set of the neural network model M, 0.05N≤N′≤0.1N.
5. A cargo volume forecasting system based on gradient boosting decision tree and neural network, which can implement the cargo volume forecasting method as claimed in claim 1 or 2, characterized in that: The cargo volume forecasting system comprises: The leaf node feature construction module is used to construct the leaf node features of each decision tree using the pre-trained gradient boosting decision tree model T with the acquired feature data X; A feature replacement module is connected to the leaf node feature construction module and is used to replace the corresponding high-dimensional category features in the feature data X with the leaf node features to obtain feature data X′ and output it. The cargo volume prediction module is connected to the feature replacement module and is used to input the feature data X′ output by the feature replacement module into the pre-trained neural network model M to perform cargo volume prediction and output the prediction result.
6. A cargo volume forecasting system based on gradient boosting decision tree and neural network according to claim 5, characterized in that: The cargo volume prediction system further includes: The model training module is used to train the neural network model M using the feature data X′ and the actual cargo volume data Y corresponding to X′ as training samples. The model training module specifically includes: The sample set division unit is used to divide the acquired feature data X and the actual cargo volume data Y corresponding to X in the historical N days into a training set and a verification set, wherein the feature data X and the actual cargo volume data Y corresponding to X in the training set are respectively recorded as X train , Y train The feature data X in the validation set and the actual cargo volume data Y corresponding to X are respectively recorded as valid , Y valid ; The leaf node feature construction unit is connected to the sample set partitioning unit and is used to convert X train , X valid All samples in construct leaf node features of each sample in each decision tree through the gradient boosting decision tree model T; A feature replacement unit, connected to the leaf node feature construction unit and the sample set division unit, is used to replace X with the leaf node feature. train , X valid The corresponding high-dimensional category features are obtained by train , X′ valid ; A model training unit, connected to the feature replacement unit, for replacing X′ train and Y train is a training sample, trained to form the neural network model M; A model performance verification unit, connected to the model training unit and the feature replacement unit, for converting X′ valid Input into the neural network model M, the neural network model M predicts the output X' valid Corresponding cargo volume forecast And according to X′ valid The corresponding Y valid and the cargo volume forecast Calculate the prediction error of the neural network model M, and then determine whether the prediction error is less than a preset error threshold, If yes, a termination model iterative training instruction is sent to the model training unit, and the model training unit terminates the iterative training of the neural network model M after receiving the instruction; If not, a continuing iterative training instruction is sent to the model training unit. After receiving the instruction, the model training unit adjusts the model training parameters to X′ train and Y train For training samples, continue to iteratively train the neural network model M.
Citation Information
Patent Citations
Gradient improvement decision neural network classification prediction method
CN110232400A
Multivariable logistics freight volume prediction method based on LSTM network
CN111563706A
GBDT learning method for online prediction task
CN112200316A