An equipment follow-up spare part demand prediction method based on ensemble learning

By employing an ensemble learning approach and utilizing scenario analysis and a stacking model, the problem of accuracy in predicting subsequent spare parts demand for equipment was solved, thereby improving the efficiency and availability of the equipment support system.

CN115438849BActive Publication Date: 2026-01-27BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211043108.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2026-01-27
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately predict the demand for spare parts for equipment, resulting in insufficient efficiency, timeliness, and practicality of equipment support systems.

Method used

An ensemble learning-based approach is adopted to obtain a set of digital features through scenario analysis, sort the features using the random forest algorithm, optimize the model using GridSearchCV, establish a Stacking model for spare parts demand prediction, and improve the Stacking model to integrate the output results of multiple models.

Benefits of technology

It improved the accuracy and comprehensiveness of spare parts demand forecasting, enhanced the combat readiness of equipment and the availability of the system, and solved the problem of balancing cost and availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115438849B_ABST
    Figure CN115438849B_ABST
Patent Text Reader

Abstract

The application discloses an equipment follow-up spare part demand prediction method based on ensemble learning, belongs to the technical field of machine learning, and comprises a theory and a method based on scene analysis, which is used for analyzing and digitally describing the use and support process of equipment, and obtaining a digital feature set influencing spare part demand; the importance of features in the digital feature set is sorted based on a random forest algorithm, and an optimal digital feature set is obtained; a plurality of alternative prediction models are determined, the hyperparameters of each alternative prediction model are optimized based on a GridSearchCV method, and an optimized alternative prediction model is obtained; an ensemble learning stacking model is established based on the optimized alternative prediction model, and the optimal digital feature set is used for training and prediction, so that a predicted value of the equipment follow-up spare part demand quantity is obtained. The application overcomes one-sidedness and limitations of a single prediction method, and provides technical support for further improving the efficiency, timeliness and practicability of a weapon equipment support system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning technology, and more specifically to a method for predicting the demand for spare parts for equipment based on ensemble learning. Background Technology

[0002] In the context of information warfare, both peacetime training and wartime command and control present more severe challenges and higher requirements for the supply and support of maintenance and spare parts. Utilizing artificial intelligence, big data, and other technologies, a maintenance support system based on and centered on spare parts distribution is designed. This system can grasp the spare parts resource needs of various units and, based on accurate predictions of future maintenance support mission demands, monitor the maintenance support process in real time and flexibly allocate spare parts resources. By minimizing inventory and utilizing mobile and flexible support facilities, a scientifically rational and efficient dynamic flow of spare parts replaces traditional fixed warehouse storage, thereby improving the combat readiness of weapons and equipment and significantly enhancing the comprehensive support capabilities of the support system.

[0003] Replacement spare parts refer to repairable and non-repairable parts necessary to maintain and restore the design performance of equipment during its stable operation phase. The accuracy of predicting the quantity of replacement spare parts is crucial to the system's availability during the equipment's use and maintenance phases.

[0004] Therefore, how to accurately predict the demand for spare parts for equipment is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of this, the present invention provides a method for predicting the demand for subsequent equipment spare parts based on ensemble learning. Taking the resources of subsequent equipment spare parts as the starting point, this invention conducts research on artificial intelligence methods for spare parts determination, applies the stacking method and strategy in ensemble learning to the demand prediction problem in spare parts management, effectively utilizes the large amount of support data generated in the process of comprehensive support for equipment spare parts, overcomes the one-sidedness and limitations of single prediction methods, and provides technical support for further improving the efficiency, timeliness and practicality of weapon and equipment support systems.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A method for predicting the demand for spare parts for equipment based on ensemble learning includes the following steps:

[0008] S1. Based on the theory and methods of scenario analysis, analyze and digitally describe the use and maintenance process of equipment to obtain a set of digital features that affect the demand for spare parts;

[0009] S2. Based on the random forest algorithm, sort the importance of features in the digital feature set, and select features according to the importance of features to obtain the optimal digital feature set;

[0010] S3. Determine multiple candidate prediction models, perform hyperparameter tuning on each candidate prediction model based on the GridSearchCV method, and obtain the tuned candidate prediction model.

[0011] S4. Based on the optimized alternative prediction model, establish an ensemble learning Stacking model, and use the optimal set of digital features to train and predict the Stacking model to obtain the predicted value of the subsequent spare parts demand of the equipment.

[0012] Preferably, the above steps also include improving the Stacking model and using the improved Stacking model to predict the quantity of spare parts required. Specifically, this includes: combining the feature matrix of the original optimal digital feature set with the output prediction value of the Stacking model base learner to generate a new high-dimensional feature matrix, and using the new high-dimensional feature matrix as the input of the Stacking model meta learner, thereby realizing the prediction of the quantity of spare parts required for the equipment.

[0013] Preferably, in step S1, based on the theory and methods of scenario analysis, the use and maintenance process of equipment is analyzed and digitally described to obtain a set of digital features affecting spare parts demand, specifically including:

[0014] Analyze the equipment's usage scenarios and maintenance support processes to obtain information on the equipment's usage scenarios and maintenance.

[0015] Analyze the cycle workload of equipment and the consumption patterns of equipment spare parts to obtain information on the consumption and replenishment of equipment spare parts.

[0016] By comprehensively analyzing equipment usage scenario information, maintenance information, and equipment spare parts consumption and replenishment quantity information, a set of digital features affecting spare parts demand is obtained.

[0017] Preferably, step S2 specifically includes the following steps:

[0018] S21: Establish a random forest model, calculate the importance of all features in the digital feature set, and sort the features in descending order of importance;

[0019] S22: Determine the deletion ratio, remove the features ranked lower according to the corresponding deletion ratio from the current set of digital features, and form a new feature set.

[0020] S23: Build a new random forest based on the new feature set, recalculate the importance of each feature in the new feature set and sort them in descending order.

[0021] S24: Repeat steps S22-S23 until the number of features in the feature set reaches a preset value m. The feature set consisting of m features is then the optimal digital feature set.

[0022] Preferably, the calculation of the importance of features in the digital feature set in step S21 adopts the following steps:

[0023] S211: Construct a random forest consisting of N decision trees. For each decision tree in the random forest, evaluate the performance of the decision tree using the out-of-bag data of each decision tree, and calculate the out-of-bag data prediction error of the decision tree, denoted as errOOB1.

[0024] S212: Randomly add noise interference to a certain feature X of all samples in the out-of-bag (OOB) data, and recalculate the out-of-bag error of the decision tree, denoted as errOOB2;

[0025] S213: Calculate the importance value of feature X using the formula ∑(errOOB2-errOOB1) / Ntree.

[0026] Preferably, step S3, which involves hyperparameter tuning of each candidate prediction model using the GridSearchCV method to obtain the tuned candidate prediction model, specifically includes:

[0027] S31: Perform hyperparameter tuning for the n_estimators and max_features parameters of the random forest. Create data tables based on the number of n_estimators and max_features parameters n1 and n2, respectively. n_estimators represents the number of decision trees in the random forest, and max_features represents the number of features randomly selected by each decision tree. Then the number of combinations of hyperparameters N is n1*n2.

[0028] S32: Determine the number of folds (cv) for cross-validation, perform cross-validation on each combination of hyperparameters in the data table, and obtain the hyperparameter combination with the highest validation score.

[0029] S33: Using the hyperparameter combination with the highest validation score, retrain a new model on the entire training set. This new model is the optimized candidate prediction model.

[0030] Preferably, step S4 establishes an ensemble learning Stacking model based on the optimized candidate prediction models, and trains and predicts the Stacking model using the optimal set of digital features to obtain the quantity of spare parts required for the equipment. Specifically, this includes:

[0031] S41: The optimized candidate prediction model obtained in step S3 is used as the candidate base model for the Stacking model;

[0032] S42: Based on the optimal set of digital features obtained in step S2, use it as the input of each candidate base model, use the historical demand data of spare parts as the label value of the candidate base model, train the candidate base model and test the generalization ability and prediction performance of the candidate base model, and select the candidate base model with the best performance as the final base model of the Stacking model.

[0033] S43: Use the final base model obtained in S42 to predict the quantity of spare parts required for the equipment, and calculate the mean square error (MSE), mean absolute error (MAE), and the score (R2_score) of the regression prediction model of the final base model.

[0034] S44: Use the Scikit-learn library to call a simple linear regression model as the meta-model, call the StackingRegressor function in the Sklearn library, input the output of the final base model into the StackingRegressor function, and obtain the quantity of spare parts required for the equipment.

[0035] As can be seen from the above technical solution, compared with the prior art, this invention discloses a method for predicting the subsequent spare parts demand of equipment based on ensemble learning. This solves the problem of incomplete and detailed analysis when determining the influencing factors of spare parts demand in traditional methods. By using scenario analysis, it provides a comprehensive and detailed digital description of the equipment's usage and support scenarios, thereby obtaining more hidden potential features. Furthermore, this invention introduces the Stacking model from ensemble learning into the field of equipment spare parts demand, which can overcome the one-sidedness and limitations of a single prediction model. By fusing multiple models, it achieves higher prediction accuracy while providing a more comprehensive result similar to multi-expert decision-making. Accurate and reasonable spare parts demand prediction is beneficial to the combat readiness of equipment and the availability of the system, and to some extent, it can also solve the problem of balancing cost and availability in the equipment support process. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0037] Figure 1 This is a schematic diagram of the overall process of the method provided in the embodiments of the present invention;

[0038] Figure 2This is a diagram illustrating the three-level maintenance support process for repairable parts in a flight regiment, provided as an embodiment of the present invention.

[0039] Figure 3 This is a schematic diagram of a set of digital features, taking flight hours and number of takeoffs and landings as examples, provided in an embodiment of the present invention.

[0040] Figure 4 This is a schematic diagram of the Stacking model structure framework provided in an embodiment of the present invention;

[0041] Figure 5 A schematic diagram of an improved Stacking model framework considering an initial feature set provided in an embodiment of the present invention. Detailed Implementation

[0042] 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.

[0043] like Figure 1 As shown in the figure, this invention discloses a method for predicting the demand for subsequent spare parts for equipment based on ensemble learning, specifically including:

[0044] S1. Based on the theory and methods of scenario analysis, analyze and digitally describe the use and maintenance process of equipment to obtain a set of digital features that affect the demand for spare parts.

[0045] Generally, spare parts demand arises from the use and maintenance of equipment, and the quantity of spare parts required is inevitably related to its inherent attributes. Spare parts demand scenario analysis refers to analyzing the entire process of equipment spare parts use and maintenance to identify factors that may influence spare parts demand. This involves digitally describing the equipment use and maintenance scenarios to obtain potential influencing factors related to spare parts demand and consumption. This process is analogous to reconstructing the thinking and decision-making process of staff officers when planning equipment.

[0046] Specifically, one can refer to the three-tier maintenance and support process for military equipment to understand the equipment's usage scenarios and spare parts replacement and maintenance procedures. Taking a certain flight regiment as an example... Figure 2The diagram illustrates the three-level maintenance support process for repairable parts in a flight regiment. During various training missions, aircraft may experience malfunctions, requiring inspection, isolation, fault location, and spare parts replacement. Faulty Line Replaceable Units (LRUs) are removed from the field and sent to the field repair shop for repair. If the field repair shop cannot repair them, the fault is isolated to the workshop's Replaceable Units (SRUs), where they are removed and repaired at the relay level. If the relay level still cannot repair them, they are sent to the base level for repair. During this process, repaired LRUs are sent to the field spare parts depot, and repaired SRUs are sent to the relay-level spare parts depot. The field spare parts depot is responsible for ensuring the availability of LRUs in the field, while the field repair shop is responsible for repairing faulty LRUs.

[0047] Analyzing the demand for spare parts in each cycle requires considering the consumption and replenishment of spare parts. Spare part consumption is related to the cycle workload and the consumption patterns of the spare parts themselves. The workload is a broad concept that can include factors during equipment use such as flight hours, number of takeoffs and landings, operating conditions, and natural environment. The consumption patterns of spare parts are related to their own attributes, such as wear sensitivity and reliability. Spare parts replenishment mainly comes from repairs and subsequent storage; therefore, factors related to maintenance support, such as personnel, equipment, and repair rate, must be considered. Through the analysis of the spare parts supply support process, potential factors affecting spare parts consumption can be summarized, as shown in Table 1.

[0048]

[0049] Table 1

[0050] Scenario modeling, sometimes called scenario / situation description or scenario storytelling, is a method for describing and analyzing user needs. It typically uses the 5W1H method to uncover the six key elements of a scenario, as shown in Table 2.

[0051]

[0052] Table 2

[0053] From the perspective of scenario analysis, the equipment use and support scenarios are re-digitally described. Taking flight hours as an example, many studies have used total flight time as an influencing factor and verified its correlation. However, considering the factors such as people, time, and environment involved in the equipment use scenarios, flight time should be further subdivided into flight time under different natural environments, different operating environments, different training subjects, and different personnel operation conditions. These differences may be potential factors affecting spare parts consumption and demand under the premise that the total flight time is fixed.

[0054] Based on the perspective of scenario analysis, the results of the analysis of the equipment use and support scenarios of a certain flight regiment are shown in Table 3:

[0055]

[0056] Table 3

[0057] Scenario modeling involves comprehensively analyzing product target information, target task information, usage environment information, and maintenance information to determine a set of digital features that may influence spare parts demand. An example is provided using flight hours and number of takeoffs and landings. Figure 3 As shown.

[0058] S2. Based on the random forest algorithm, the importance of features in the digital feature set is ranked, and features are selected according to their importance to obtain the optimal digital feature set.

[0059] The data features obtained from the scenario analysis in step S1 are numerous, including a lot of noise and redundancy. Too many features increase model complexity, computation time, and the risk of overfitting. Therefore, it is necessary to calculate the importance of each feature and rank them, then select the most important features from all features. Feature selection based on the calculated feature importance aims to find features highly correlated with the dependent variable, selecting a smaller number of features that can adequately predict the outcome of the dependent variable. A key feature of random forests is their ability to calculate the importance of individual feature variables. The steps of feature selection using the random forest method are as follows:

[0060] S21: Establish a random forest model, calculate the importance of all features in the digital feature set, and sort the features in descending order of importance;

[0061] S22: Determine the deletion ratio, remove the features ranked lower according to the corresponding deletion ratio from the current digital feature set, and obtain a new feature set. Specifically, if the deletion ratio is 20%, delete the 20% of the features ranked lower and retain 80% of the features ranked higher to form a new feature set.

[0062] S23: Build a new random forest based on the new feature set, recalculate the importance of each feature in the new feature set and sort them in descending order.

[0063] S24: Repeat steps S22-S23 until the number of features in the feature set reaches the preset value m. The feature set consisting of m features is then the optimal digital feature set. Since the random forest model has inherent randomness, a new random forest needs to be built using the new feature set. The importance of each feature in the new feature set is then recalculated and sorted in descending order.

[0064] Step S21 involves calculating the importance of features in the digital feature set using the following steps:

[0065] S211: Construct a random forest consisting of N decision trees. For each decision tree in the random forest, evaluate its performance using the out-of-bag data and calculate the out-of-bag prediction error, denoted as errOOB1. Since the random forest uses self-sampling to obtain a subset of the original dataset, approximately 36.8% of the data will never be sampled, which is called out-of-bag data. The out-of-bag data can be used as the test set to evaluate the performance of the decision tree, thus obtaining the out-of-bag prediction error.

[0066] S212: Randomly add noise interference to a certain feature X of all samples in the out-of-bag (OOB) data, and recalculate the out-of-bag error of the decision tree, denoted as errOOB2;

[0067] S213: The importance value of feature X can be calculated using the formula ∑(errOOB2-errOOB1) / Ntree, where Ntree represents the number of decision trees in the random forest;

[0068] By performing steps S211, S212, and S213 on all features, the calculated importance values ​​for all features can be obtained.

[0069] S3. Determine multiple candidate prediction models, perform hyperparameter tuning on each candidate prediction model based on the GridSearchCV method, and obtain the tuned candidate prediction model.

[0070] In machine learning models, parameters that need to be manually selected are called hyperparameters. For example, the number of decision trees in a random forest needs to be specified in advance. Inappropriate hyperparameter selection can easily lead to underfitting or overfitting. Scikit-Learn's GridSearchCV is a method that combines grid search and cross-validation (CV) to train the model using each set of hyperparameters and select the hyperparameter combination with the smallest validation set error. Grid search searches for parameters, that is, within a specified parameter range, adjusting the parameters step by step, and using the adjusted parameters to train the learner. GridSearchCV has an attribute called best_score_, which stores the highest score obtained by the model in cross-validation. Based on this, the parameters with the highest accuracy on the validation set are found from all parameters. The specific steps of the GridSearchCV method are illustrated below using a random forest as an example:

[0071] S31: Perform hyperparameter tuning for n_estimators and max_features of the random forest. Create data tables based on the number of parameters n1 and n2 of n_estimators and max_features, respectively. n_estimators represents the number of decision trees in the random forest, and max_features represents the number of features randomly selected for each decision tree. Then the number of combinations of hyperparameters N is n1*n2.

[0072] In one specific embodiment, assuming that n_estimators has three parameter choices and max_features has four parameters, all possibilities can be represented as a 3×4 table. The loop process is to traverse and search in each grid, so there are ultimately 3×4=12 combinations of hyperparameters.

[0073] S32: Determine the number of folds (cv) for cross-validation, perform cross-validation on each combination of hyperparameters in the data table, and obtain the hyperparameter combination with the highest validation score.

[0074] S33: Using the hyperparameter combination with the highest validation score, retrain a new model on the entire training set. This new model is the optimized candidate prediction model.

[0075] In one specific embodiment, the parameter cv is set to 5, meaning the cross-validation fold number is 5. Assuming n_estimators takes values ​​from the set [10, 20, 30], for n_estimators = 10, the model is trained using the 2nd to 5th data sets, and the 1st data set is used as the validation set to score the trained model, obtaining the first score. Then, a new decision tree with n_estimators = 10 is constructed, trained using the 1st and 3rd to 5th data sets, and the 2nd data set is used as the validation set to score the trained model, obtaining the second score. This process continues, effectively training and validating the decision tree model with n_estimators = 10 5 times, obtaining 5 validation scores. The average of these 5 validation scores is the final validation score of the decision tree model with n_estimators = 10. For n_estimators = 20 and 30, the same cross-validation process as with n_estimators = 10 is performed to obtain their final validation scores. Next, the final validation scores of the decision trees for the three n_estimators are compared, and the highest score indicates the optimal n_estimators parameters. For the 12 possible combinations of the two parameters, each combination is trained 5 times on the training set, for a total of 12 × 5 = 60 training iterations. After training, the best hyperparameter combination is obtained using the best_params_ parameter. After obtaining the optimal parameter combination, a new model is retrained on the entire training set; this new model is the optimal model.

[0076] The specific details of the parameters in the candidate prediction models in this embodiment can be represented by Table 4.

[0077]

[0078] Table 4

[0079] The specific parameters of the candidate prediction models after parameter tuning are shown in Table 5.

[0080]

[0081]

[0082] Table 5

[0083] S4. Based on the optimized candidate prediction models, establish an ensemble learning Stacking model, and use the optimal set of digital features to train and predict the Stacking model to obtain the quantity of spare parts required for subsequent equipment. For example... Figure 4 As shown, it specifically includes:

[0084] S41: Determine the candidate base model and adjust the hyperparameters to the optimal value using the GridSearchCV method in step 3;

[0085] S42: Based on the feature set obtained in step 2, use it as the input of each candidate base model, and use the historical spare parts demand quantity as the label value of each candidate base model. Train the model and test its generalization ability and prediction performance through cross-validation. Select the model with the best performance as the final base model in the Stacking model base model layer.

[0086] S43: Use the final base model obtained in S42 to predict the quantity of spare parts required for the equipment, and calculate the mean square error (MSE), mean absolute error (MAE), and the score (R2_score) of the regression prediction model of the final base model.

[0087] S44: Use the Scikit-learn library to call a simple linear regression model as the meta-model, call the StackingRegressor function in the Sklearn library, input the output of the final base model into the StackingRegressor function, and obtain the quantity of spare parts required for the equipment.

[0088] Stacking models achieve higher performance by fusing multiple models, but the key is to fuse "strong and diverse" models. Therefore, the selection of the base model layer is crucial, affecting both the final model's performance and serving as the benchmark for performance comparison. Stacking models consist of a base model layer and a meta-model layer. The base model layer comprises several individual models, typically heterogeneous models—the same model with different parameters or different models. The meta-model layer generally consists of a single model. The outputs of each model in the base model layer serve as input features for the meta-model, which then performs classification or regression tasks.

[0089] In a typical Stacking model, a single base learner can only output one set of predictions. The number of features in the meta-learner's feature matrix equals the number of base learners. Therefore, the number of features in the meta-learner's feature matrix is ​​inevitably insufficient. Taking the Stacking model constructed above as an example, since there are only three base learners, only three features are ultimately input to the meta-learner. To address the problem of the limited number of features in the meta-learner of the traditional Stacking model, and to better uncover the hidden relationships between feature attributes in the dataset, this invention also includes an improvement to the traditional Stacking model. Specifically, the output of the base learners is combined with the feature matrix of the original digital feature set obtained in step S1 to form a high-dimensional feature vector, and the meta-layer learner is trained based on this high-dimensional feature vector. For example... Figure 5As shown, the traditional Stacking model is improved, and the improved Stacking model is used to predict the quantity of spare parts required. Specifically, this includes:

[0090] S51: Calculate the output prediction value of each base learner in the Stacking model;

[0091] S52: Combine the predicted values ​​of each base learner with the feature matrix of the original digital feature set to form a high-dimensional feature vector, which serves as the input feature of the meta-learner. Historical spare parts demand data serves as the meta-model label.

[0092] S53: Use a meta-learner, i.e., a simple linear regression model, to train and test the model, provide the prediction results of the spare parts demand quantity, and calculate the model error and performance parameters.

[0093] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0094] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for predicting the demand for subsequent spare parts for equipment based on ensemble learning, characterized in that, The method includes the following steps: S1. Based on scenario analysis theories and methods, analyze and digitally describe the use and maintenance process of equipment to obtain a set of digital features affecting spare parts demand; specifically including: Analyze the equipment's usage scenarios and maintenance support processes to obtain information on the equipment's usage scenarios and maintenance. Analyze the cycle workload of equipment and the consumption patterns of equipment spare parts to obtain information on the consumption and replenishment of equipment spare parts. By comprehensively analyzing equipment usage scenario information, maintenance information, and equipment spare parts consumption and replenishment quantity information, a set of digital features affecting spare parts demand is obtained. S2. Based on the random forest algorithm, sort the importance of features in the digital feature set, and select features according to the importance of features to obtain the optimal digital feature set; S3. Determine multiple candidate prediction models, perform hyperparameter tuning on each candidate prediction model based on the GridSearchCV method, and obtain the tuned candidate prediction model. S4. Based on the optimized alternative prediction model, establish an ensemble learning Stacking model, and use the optimal set of digital features to train and predict the Stacking model to obtain the predicted value of the quantity of spare parts required for the equipment. It also includes improving the Stacking model and using the improved Stacking model to predict the quantity of spare parts required. Specifically, it includes combining the feature matrix of the original optimal digital feature set with the output prediction value of the Stacking model base learner to generate a new high-dimensional feature matrix, and using the new high-dimensional feature matrix as the input of the Stacking model meta learner, thereby realizing the prediction of the quantity of spare parts required for the equipment.

2. The method for predicting equipment subsequent spare parts demand based on ensemble learning according to claim 1, characterized in that, Step S2 specifically includes the following steps: S21: Establish a random forest model, calculate the importance of all features in the digital feature set, and sort the features in descending order of importance; S22: Determine the deletion ratio, remove features ranked lower according to the corresponding deletion ratio from the current digital feature set, and form a new feature set; S23: Build a new random forest based on the new feature set, recalculate the importance of each feature in the new feature set and sort them in descending order; S24: Repeat steps S22-S23 until the number of features in the feature set reaches the preset value m. Then the feature set composed of m features is the optimal digital feature set.

3. The method for predicting equipment subsequent spare parts demand based on ensemble learning according to claim 2, characterized in that, Step S21 involves calculating the importance of features in the digital feature set using the following steps: S211: Construct a random forest consisting of N decision trees. For each decision tree in the random forest, evaluate the performance of the decision tree using the out-of-bag data of each decision tree, and calculate the out-of-bag data prediction error of the decision tree, denoted as errOOB1. S212: Randomly add noise interference to a certain feature X of all samples in the out-of-bag (OOB) data, and recalculate the out-of-bag error of the decision tree, denoted as errOOB2; S213: Calculate the importance value of feature X using the formula ∑(errOOB2-errOOB1) / Ntree.

4. The method for predicting equipment subsequent spare parts demand based on ensemble learning according to claim 1, characterized in that, Step S3 involves hyperparameter tuning of each candidate prediction model using the GridSearchCV method to obtain the tuned candidate prediction models, specifically including: S31: Perform hyperparameter tuning for the n_estimators and max_features parameters of the random forest. Create data tables based on the number of n_estimators and max_features parameters n1 and n2, respectively. n_estimators represents the number of decision trees in the random forest, and max_features represents the number of features randomly selected by each decision tree. Then the number of combinations of hyperparameters N is n1*n2. S32: Determine the number of folds (cv) for cross-validation, perform cross-validation on each combination of hyperparameters in the data table, and obtain the hyperparameter combination with the highest validation score. S33: Using the hyperparameter combination with the highest validation score, retrain a new model on the entire training set. The new model is the optimized candidate prediction model.

5. The method for predicting equipment subsequent spare parts demand based on ensemble learning according to claim 1, characterized in that, Step S4 specifically includes: S41: The optimized candidate prediction model obtained in step S3 is used as the candidate base model for the Stacking model; S42: Based on the optimal set of digital features obtained in step S2, use it as the input of each candidate base model, use the historical demand data of spare parts as the label value of the candidate base model, train the candidate base model and test the generalization ability and prediction performance of the candidate base model, and select the candidate base model with the best performance as the final base model of the Stacking model. S43: Use the final base model obtained in S42 to predict the quantity of spare parts required for the equipment, and calculate the mean square error (MSE), mean absolute error (MAE), and the score (R2_score) of the regression prediction model of the final base model. S44: Use the Scikit-learn library to call a simple linear regression model as the meta-model, call the StackingRegressor function in the Sklearn library, input the output of the final base model into the StackingRegressor function, and obtain the quantity of spare parts required for the equipment.

Citation Information

Patent Citations

  • Method for predicting concrete durability based on data mining and intelligent algorithm

    CN111861264A

  • Spare part demand prediction method fusing time sequence prediction model and machine learning model

    CN113127537A