Recommendation prediction method based on step-by-step reverse modeling
Through the recommendation prediction method of stepwise reverse modeling, data sparsity and cold start problems in traditional recommendation systems are solved, and efficient and personalized recommendation prediction is achieved. The optimal feature combination is generated through reverse modeling strategies and feature engineering technology to overcome The limitations of traditional methods are achieved and accurate recommendation results are achieved.
Patent Information
- Application Number
- CN202411307107.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
AI Technical Summary
There are data sparsity and cold start problems in traditional recommendation systems, making it difficult to achieve efficient and personalized recommendation predictions through existing machine learning methods.
The recommended prediction method of stepwise reverse modeling includes data preprocessing, feature engineering, feature sorting, reverse modeling strategy, recommended value generation and prediction and evaluation. Through reverse modeling strategy and advanced feature engineering technology, the target dependent variable is based on the target Generate the best feature combination to achieve specific prediction goals.
It provides an efficient, flexible and highly adaptable solution, overcomes the limitations of traditional recommendation systems, and achieves more accurate and effective recommendations, especially suitable for tasks such as complex data processing and specific target prediction.
Smart Images

Figure CN119293325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis and mining, and in particular to a recommendation prediction method based on step-by-step inverse modeling. Background Art
[0002] Common problems in traditional recommendation systems include data sparsity and cold start problems. To solve these problems, machine learning techniques are widely used to train and optimize models through user behavior data and project features, significantly improving the accuracy and personalization of recommendations. However, these methods mainly focus on finding similar users or projects from existing data to provide recommendations. Summary of the invention
[0003] In order to solve the technical problems existing in the prior art, the present invention provides a recommendation prediction method of step-by-step inverse modeling, which aims to recommend the optimal value of each feature X in the data set according to the expected value of the target dependent variable y, so as to achieve a specific prediction goal.
[0004] To achieve the above object, the technical solution of the present invention is as follows:
[0005] A recommendation prediction method based on stepwise inverse modeling includes the following steps:
[0006] Step 1: data preprocessing;
[0007] Step 2: Feature Engineering;
[0008] Step 3: feature sorting, set the feature sorting method;
[0009] Step 4: Reverse modeling strategy;
[0010] Step 5: Generate recommended values;
[0011] Step 6: character feature inverse processing;
[0012] Step seven: prediction and evaluation.
[0013] As a preferred technical solution, in step one, data preprocessing includes data cleaning and missing value processing.
[0014] As a preferred technical solution, in step 2, feature engineering is to encode character features and convert character features into numerical features; and set whether to fix certain feature values and store them.
[0015] As a preferred technical solution, in step three, the feature sorting method uses variance inflation factor analysis to sort the features in ascending order according to the variance inflation factor values, and the first feature has the weakest collinearity with other features.
[0016] As a preferred technical solution, in step three, the feature sorting method uses correlation analysis.
[0017] As a preferred technical solution, in step four, the reverse modeling strategy includes: selecting a base learner, selecting the first feature X1 after sorting as the dependent variable, y as the independent variable, supporting multiple independent variables, building model M1, then selecting X2 as the dependent variable, y and X1 as independent variables, building model M2, and selecting X1, X2, X3, ..., Xn as dependent variables in turn to build multiple models M1, M2, M3, ..., Mn.
[0018] As a preferred technical solution, in step five, based on the target y value set by the user, the trained model is used to gradually generate the recommended value of each feature.
[0019] As a preferred technical solution, in step six, the one-hot encoded character features are decomposed into multiple new variables. For the recommended value obtained in step five, the softmax function is used to obtain the classification category with the highest probability as the recommended value of the character feature.
[0020] As a preferred technical solution, in step seven, a model is forwardly established, and the recommended value obtained in step five is used as input to obtain a predicted value to check whether it meets expectations and to evaluate whether the recommended value is reasonable.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] The step-by-step reverse modeling recommendation prediction method of the present invention provides an efficient, flexible and adaptable solution through reverse modeling strategy and advanced feature engineering technology, which is particularly suitable for recommendation tasks that require processing complex data and accurately predicting specific targets. This method not only overcomes the limitations of traditional recommendation systems, but also recommends the best feature combination according to the expected target value, thereby achieving more accurate and effective recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of a data algorithm model verification method in an embodiment of the present invention;
[0024] Figure 2 It is the algorithm recommendation result in the embodiment.
[0025] Figure 3 It is the result of using the recommended predicted labels. DETAILED DESCRIPTION
[0026] The technical solution of the present invention is further described below in conjunction with specific implementation methods:
[0027] like Figure 1As shown, a recommendation prediction method based on stepwise inverse modeling includes the following steps:
[0028] Step 1: Preprocess the input data set, including data cleaning, missing value processing, etc.
[0029] Step 2: feature engineering, encoding character features, for example, using one-hot encoding to convert character features into numerical features, and setting whether to fix certain feature values and store them;
[0030] Step 3: feature sorting, set the feature sorting method;
[0031] The present invention uses variance inflation factor (VIF) analysis. For each feature, the VIF value indicates the strength of the collinearity between the feature and other features. The features are sorted in ascending order according to the VIF value. The first feature has the weakest collinearity with other features, thereby reducing multicollinearity errors. Other feature sorting methods can also be selected, such as using correlation analysis to sort according to the correlation with label y, or the correlation between features.
[0032] Step 4: Reverse modeling strategy: select a base learner, such as XGBoost, select the first feature X1 after sorting as the dependent variable, and y as the independent variable (supports multiple y, such as y1, y2...
[0033] As the independent variable), construct model M1, then select X2 as the dependent variable, y and X1 as the independent variables, construct model M2, and so on.
[0034] Using the above method, select X1, X2, X3, ..., Xn as dependent variables in turn and build multiple models M1, M2, M3, ..., Mn.
[0035] Step 5: Generate recommended values. Based on the target y value set by the user (if there are multiple y values, set the values of y1, y2, etc.), use the trained model to gradually generate recommended values for each feature.
[0036] For example, first input the expected value of y, use M1 to generate the recommended value v1 of X1, then input y and v1, use M2 to generate the recommended value of X2, and so on, until the recommended values v1, v2...vn of all features are generated.
[0037] If fixed values are set for certain features in step E2, such as X3 is set to 1, then the two steps of using the M2 model to predict X3 and establishing the M3 model can be skipped, and the fixed value of 1 is used as the output instead. The X3 input used by M4 during prediction is 1, and the rest remains unchanged.
[0038] Step 6: Inverse processing of character features. For one-hot encoded character features, they will be decomposed into multiple new variables, such as X1...Xm, with values ranging from 0 to 1. The m recommended values obtained in step A-5 can be regarded as the probability distribution of classification categories. The present invention uses the softmax function to obtain the classification category with the largest probability as the recommended value of the character feature.
[0039] Step 7, prediction and evaluation, forward model building, that is, y is the dependent variable, and each X-position independent variable builds a model (it can be a model built after parameter tuning in the normal data analysis process). In the case of multiple y, multiple models are normally built. Use the recommended value obtained in step A-5 as input to get the predicted value and check whether it meets expectations (generally there is a certain error from the expected value, but the fluctuation is not large).
[0040] At the same time, the rationality of the recommended value is evaluated. In the process of establishing n models using step A-5, the r2 value of the training set is used to evaluate the degree of fitting variance. The recommended value is compared with the mean and extreme value of the original eigenvalue to ensure that no outliers will appear. Multiple tests have found that no outliers will appear and the recommended value will not be too far from the mean.
[0041] Example
[0042] In order to make the technical means, creative features, objectives and effects of the present invention easy to understand, the following embodiments are combined with the accompanying drawings to specifically describe the recommendation prediction algorithm of the present invention. The method includes the following parts:
[0043] 1. Dataset feature processing
[0044] Dataset description: The basic data of inner layer etching line width modeling in the PCB manufacturing field is used. The features include 25 numerical features such as HCl concentration, copper thickness, and etching speed, which are marked with X1 to X25; two character classification features, pre-processing line and exposure machine line, are marked with X26 and X27; label y1 is the minimum line width deviation, and the value combination is:
[0045]
[0046] Step 1: Preprocess the input data set, including data cleaning, missing value processing, etc.
[0047] In this example, the present invention adopts the Z-score outlier processing method, where the outlier is replaced by the mode of the eigenvalue; and the missing value is processed by the forward and backward filling missing value method, that is, the missing value is first filled with the previous sample, and then filled with the next sample.
[0048] Step 2: One-hot encode X26 and X27. In this example, X26 has 4 categories and X27 has 6 categories. After encoding, they are expanded to X26_category name 1...X26_1 category name 4, X27_category name 1...X27_category name 6, and the value is 0 or 1. There are 35 features in total.
[0049] The fixed features are X1~X5, and they have ten different value combinations. Each fixed combination is divided into a group, which is divided into 10 groups here. Each group is subjected to this prediction recommendation algorithm separately, that is, ten groups of recommended values will be obtained, which are respectively applicable to these 10 different scenarios.
[0050] Step 3: Calculate the variance inflation factor (VIF value) of all features and other features respectively, and sort the results in ascending order as the order of modeling.
[0051] 2. Reverse Modeling
[0052] Step 4: In this example, XGBoost is selected as the base learner, and the model is built in reverse step by step. The feature order obtained in step 3 is X2, X3, X22..., and since X2 and X3 have fixed values, the first two modeling can be skipped. Therefore, X22 is directly used as the dependent variable, and y1, X2, and X3 are used as independent variables for modeling. By analogy, 30 models such as M1, M2...M30 are established (35 features minus 5 features with fixed values).
[0053] In step 5, input the expected y1 value 0, X2 and X3 fixed values, and use the model established in step 4 to predict the value of X22, and so on to obtain all recommended values.
[0054] Step 6: Use the sotmax function to obtain the categories of probability distribution for X26_category name 1...X26_category name 4, and use the sotmax function to obtain the categories of probability distribution for X27_category name 1...X27_category name 6. So far, all the recommended values are obtained.
[0055] For five different fixed values, five reverse modeling recommendations are performed to obtain five sets of recommended values.
[0056] 3. Prediction and evaluation
[0057] Step 7: Forward model establishment, using y1 as the dependent variable, and X1~X25, X26_category name 1...X26_category name 4, X27_category name 1...X27_category name 6 as independent variables to establish model A1.
[0058] Input five sets of recommended values and get five expected y1s. The difference between the predicted value and the expected value is not much. Output the absolute value difference between the recommended value and the original eigenvalue mean, and output multiple evaluation indicators such as rmse and r2 in the reverse modeling process.
[0059] This embodiment is only a further explanation of the invention rather than a limitation of the invention. After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed. However, as long as they are within the scope of the claims of the invention, they are protected by the patent law.
Claims
1. A recommendation prediction method based on stepwise inverse modeling, characterized in that: The method comprises the following steps: Step 1: data preprocessing; Step 2: Feature Engineering; Step 3: feature sorting, set the feature sorting method; Step 4: Reverse modeling strategy; Step 5: Generate recommended values; Step 6: character feature inverse processing; Step seven: prediction and evaluation.
2. The recommendation prediction method based on stepwise inverse modeling according to claim 1, characterized in that: In the step 1, data preprocessing includes data cleaning and missing value processing.
3. The recommendation prediction method based on stepwise inverse modeling according to claim 1, characterized in that: In the step 2, feature engineering is to encode character features and convert character features into numerical features; Set whether to fix certain feature values and store them.
4. The recommendation prediction method based on stepwise inverse modeling according to claim 1, characterized in that: In the step three, the feature sorting method uses variance inflation factor analysis to sort the features in ascending order according to the variance inflation factor values, and the first feature has the weakest collinearity with other features.
5. The recommendation prediction method based on stepwise inverse modeling according to claim 1, characterized in that: In step three, the feature ranking method uses correlation analysis.
6. The recommendation prediction method based on stepwise inverse modeling according to claim 1, characterized in that: In step four, the reverse modeling strategy includes: selecting a base learner, selecting the first feature X1 after sorting as the dependent variable, y as the independent variable, supporting multiple independent variables, building model M1, then selecting X2 as the dependent variable, y and X1 as independent variables, building model M2, and selecting X1, X2, X3, ..., Xn as dependent variables in turn to build multiple models M1, M2, M3, ..., Mn.
7. The recommendation prediction method based on stepwise inverse modeling according to claim 6, characterized in that: In step five, according to the target y value set by the user, the trained model is used to gradually generate the recommended value of each feature.
8. The recommendation prediction method based on stepwise inverse modeling according to claim 7, characterized in that: In step six, the one-hot encoded character features are decomposed into multiple new variables. For the recommended value obtained in step five, the softmax function is used to obtain the classification category with the highest probability as the recommended value of the character feature.
9. The recommendation prediction method based on stepwise inverse modeling according to claim 7, characterized in that: In step seven, a model is forwardly established, and the recommended value obtained in step five is used as input to obtain a predicted value to check whether it meets expectations and to evaluate whether the recommended value is reasonable.