A method for predicting the risk of professional automation based on a logistic regression model and an XGBoost model

CN122887159APending Publication Date: 2026-10-09NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610972544.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

研究数据多局限于单一国家或地区,样本与变量维度不足,难以形成跨国家、跨行业的普适性结论

Benefits of technology

[0030]1、本发明兼顾了整体预测精度与高风险识别灵敏度,可根据实际场景灵活选用逻辑回归或XGBoost模型。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887159A_ABST
    Figure CN122887159A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on logistic regression model and XGBoost model's professional automation risk prediction method, including with global multinational, cross-industry professional data as basis, after data processing, professional automation risk is divided into low, middle, high three categories;Parallelly construct logic regression, random forest, AdaBoost, LightGBM, XGBoost five kinds of models, through accuracy, precision, recall rate, score and complete multidimensional evaluation;Optimization logic regression is used for large-scale risk census, XGBoost is used for high-risk early warning, and SHAP method is introduced to cross-explain the feature attribution of the two models, and the artificial intelligence replacement score, skill gap index and retraining urgency index are the core driving factors;Finally, the stability and generalization ability of the model are tested by 10-fold cross-validation. The application considers prediction accuracy and interpretability, and is suitable for government employment monitoring, education agency talent training, enterprise human planning and laborer career planning, and has significant application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of big data analysis and machine learning technology, and in particular to an automated occupational risk prediction method based on logistic regression and XGBoost models. Background Technology

[0002] In recent years, artificial intelligence (AI) technology has rapidly iterated and deeply penetrated various industries, driving profound structural changes in the global labor market. While AI has significantly improved productivity, it has also impacted traditional employment structures and job stability. Accurately identifying occupational automation risks and clarifying their driving factors is a crucial foundation for governments to optimize employment policies, universities to adjust talent training programs, and enterprises to plan human resource strategies. Currently, the academic community both domestically and internationally has conducted extensive research on this topic. Most studies rely on traditional econometric models such as multiple regression and difference-in-differences to explore the correlation between factors such as AI application levels, skills gaps, retraining needs, and occupational automation risks. Some studies have also introduced machine learning algorithms such as random forests and gradient boosting trees to further improve the accuracy of risk prediction.

[0003] However, existing research methods still have significant shortcomings. Research data is often limited to single countries or regions, with insufficient sample and variable dimensions, making it difficult to draw universally applicable conclusions across countries and industries. Traditional linear models offer strong interpretability but fail to capture complex nonlinear interactions between variables, easily leading to data bias and distorted conclusions. Pure machine learning models offer higher predictive accuracy but suffer from a black-box problem, making their decision-making basis difficult for policymakers to accept. Furthermore, current research lacks systematic performance comparisons of different models and an analytical framework that balances predictive accuracy with high-risk identification sensitivity, making it difficult for existing research to balance accuracy and interpretability, and unable to fully elucidate the core driving mechanisms of occupational risk. Therefore, to address these issues, this application proposes an automated occupational risk prediction method based on a combination of logistic regression and XGBoost models. Through dual-model synergistic comparison and SHAP interpretability analysis, it reveals the core driving paths of risk formation while ensuring predictive accuracy. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a method for predicting occupational automation risks based on logistic regression and XGBoost models. By constructing a multi-model comparison framework and introducing SHAP interpretability analysis, it achieves accurate classification of occupational automation risk levels and reliable identification of core driving factors, thereby providing government departments, educational institutions, enterprises, and workers with hierarchical governance decision support that combines theoretical rigor and practical operability.

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

[0006] An automated occupational risk prediction method based on logistic regression and XGBoost models includes the following steps:

[0007] Step 1: Data Acquisition and Preprocessing: Collect global cross-border and cross-industry occupational datasets, including more than 20 variables such as occupational automation risk percentage, artificial intelligence substitution score, skills gap index, and retraining urgency index; remove invalid label variables, use the isolation forest algorithm to remove outliers, perform One-Hot encoding on categorical variables, standardize numerical variables, and use principal component analysis (PCA) to eliminate multicollinearity;

[0008] Step 2, Occupational Automation Risk Level Coding and Classification: The percentage of continuous occupational automation risk is classified into three risk levels—low, medium, and high—based on thresholds, forming a three-category task.

[0009] Step 3: Parallel construction of multiple models: Simultaneously construct five classification models: Logistic Regression, Random Forest, AdaBoost, LightGBM, and XGBoost;

[0010] Step 4: Multi-dimensional model performance evaluation: using accuracy, precision, recall, and... Fraction, The indicators were used to evaluate the models, and the best results were selected to use logistic regression for large-scale risk screening and XGBoost for accurate early warning of high-risk occupations.

[0011] Step 5: Feature Attribution and Cross-Interpretation Based on SHAP: Calculate the SHAP values ​​of each feature in the logistic regression and XGBoost models respectively, quantify the global importance of the features and reveal the direction of influence; identify the AI ​​substitution score, skills gap index, and retraining urgency index as the core driving factors of occupational automation risk;

[0012] Step Six: Model Validation: 10-fold cross-validation is used, and the results are verified using MAE and... The indicators are used to test the model's generalization ability, error performance, and stability.

[0013] Preferably, in step one, the cumulative variance is retained by principal component analysis (PCA). Principal components are used to eliminate multicollinearity.

[0014] Preferably, in step two, the encoding method uses integer labels, and the risk level classification threshold is: automation risk percentage. For low risk, the percentage of automation risk is [missing information]. Medium risk, percentage of automated risk It is considered high-risk.

[0015] Preferably, in step three, the logistic regression model formula is:

[0016] in, It is an eigenvector. It is a weight coefficient vector. It is a vector dot product. It is a bias term. It is a natural constant. It is a logical function, defined as follows: , This represents the probability that a sample belongs to category 1 (high risk). Due to its simple model structure and parameters with clear economic meaning, it has high interpretability; each regression coefficient can reflect the direction and intensity of the corresponding feature's influence on changes in occupational automation risk levels.

[0017] Preferably, in step three, the formula for the random forest model is:

[0018] in, Indicates the first The prediction output of each decision tree. Represents taking the mode, a single decision tree. During training, not only is the original training set automatically sampled, but at each node split, a subset of features is randomly selected from all features for optimal splitting. This randomness effectively reduces model variance and prevents overfitting.

[0019] Preferably, in step three, the AdaBoost model formula is:

[0020] in, It is a symbolic function. It is the total number of weak classifiers. It is the first Weak classifier trained in rounds, Its weight is calculated using the following formula: , yes The weighted error rate. In occupational automated risk classification tasks, the risk boundaries between different occupations may be quite blurred. AdaBoost improves the overall classification performance by progressively strengthening its learning ability on these difficult samples.

[0021] Preferably, in step three, the LightGBM model formula is:

[0022] in, It was before Ensemble prediction of wheel models It is the first The newly added decision tree, It refers to the learning rate. LightGBM's innovation lies in its use of a histogram-based splitting method and a leaf-wise growth strategy, which significantly improves training speed and memory efficiency while ensuring model accuracy. It can effectively handle high-dimensional features in this invention and capture complex nonlinear relationships, thereby improving the accuracy of automated occupational risk classification.

[0023] Preferably, in step three, the XGBoost model formula is:

[0024] in, Total number of training samples and These are the first and second gradients of the loss function with respect to the current model's predicted values, respectively. It is the first The newly added base learner for the first round Sample The predicted output, This is a regularization term. Compared to traditional gradient boosting, XGBoost introduces second-order gradient information and regularization, which improves the model's predictive and generalization capabilities.

[0025] In step four, accuracy, precision, and recall are used. Fraction( -score) and The model performance is evaluated using multiple metrics, including Receiver Operating Characteristic - Area UnderCurve. It is considered one of the important comprehensive evaluation indicators because it does not depend on a specific classification threshold and can comprehensively reflect the classification ability of the model under different decision thresholds.

[0026] Preferably, in step five, the skills gap index in the logistic regression model shows a negative correlation, while the AI ​​substitution score, skills gap index, and retraining urgency index in the XGBoost model all show positive driving forces, with the attribution results of the nonlinear model being taken as the standard. Here, logistic regression (linear representation) and XGBoost (nonlinear representation) are selected to calculate the SHAP value of each feature respectively. The SHAP value is based on game theory and can fairly quantify the contribution of each feature to a single prediction result. Its average absolute SHAP value can serve as a robust indicator for measuring the global importance of a feature.

[0027] Preferably, in step six, the 10-fold cross-validation randomly divides the training data into 10 subsets, takes one subset as the validation set and the remaining nine subsets as the training set, and repeats the calculation of MAE and R² 10 times to verify the model stability.

[0028] By employing the aforementioned technical solutions, and comparing the multidimensional performance of various models such as logistic regression, random forest, AdaBoost, LightGBM, and XGBoost on the same occupational automated risk level prediction task, a basis for selecting model combinations can be provided for different policy scenarios, avoiding risk misjudgment or resource misallocation due to inappropriate model selection. Furthermore, by introducing the SHAP interpretability method to compare and analyze the feature importance ranking and influence direction of linear models (logistic regression) and nonlinear models (XGBoost), it identifies which factors, such as AI substitution scores, skills gaps, and retraining urgency, are the true root causes of risk, thus providing accurate and understandable causal logic support for labor market policy formulation.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] 1. This invention balances overall prediction accuracy with high risk identification sensitivity, and allows for flexible selection of logistic regression or XGBoost models depending on the actual scenario.

[0031] 2. This invention reveals the key differences between linear and nonlinear models in risk attribution and clarifies that artificial intelligence-based alternative scoring is the core positive driving factor.

[0032] 3. This invention provides a complete closed-loop tool from data to decision-making, which can directly serve the hierarchical governance needs of governments, educational institutions, enterprises and workers. Attached Figure Description

[0033] Figure 1 This is a bar chart comparing the performance of each model in the embodiments of the present invention;

[0034] Figure 2 The model in the embodiment of the present invention Curve comparison chart;

[0035] Figure 3 This is a heatmap of the confusion matrix of each model in the embodiments of the present invention;

[0036] Figure 4 This is a ranking chart of the average absolute SHAP values ​​of each feature of the logistic regression model in this embodiment of the invention;

[0037] Figure 5 This is a sorting diagram of the average absolute SHAP values ​​of each feature of the XGBoost model in this embodiment of the invention;

[0038] Figure 6 This is a scatter plot summarizing the SHAP values ​​of each feature of the logistic regression model in this embodiment of the invention.

[0039] Figure 7 This is a scatter plot summarizing the SHAP values ​​of each feature of the XGBoost model in this embodiment of the invention.

[0040] Figure 8 This is a box plot of 10-fold cross-validation MAE in an embodiment of the present invention;

[0041] Figure 9 This is a 10-fold cross-validation method used in an embodiment of the present invention. Line chart;

[0042] Figure 10 This is the overall flowchart of the present invention. Detailed Implementation

[0043] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the scope of protection of the present invention. The embodiments described in this invention are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0044] Example:

[0045] Step 1: Data Acquisition and Preprocessing

[0046] We collected data from the “Future of Work in the Age of AI (2020–2026)” global cross-border and cross-industry dataset released by the Kaggle platform, which includes more than 20 variables such as occupational automation risk percentage, artificial intelligence substitution score, skills gap index, and retraining urgency.

[0047] The data preprocessing process is as follows:

[0048] 1. Data cleaning: Delete invalid identifier variables job_id that contain no information. After verification, the dataset has no missing values ​​and no imputation is required.

[0049] 2. Outlier Removal: The Isolation Forest algorithm is used, with a set outlier ratio. Approximately 450 abnormal samples were identified and removed, while approximately 14,550 valid samples were retained.

[0050] 3. Feature Encoding: Perform One-Hot encoding on categorical variables such as job_role, industry, and country to convert them into numerical features;

[0051] 4. Standardization: Perform Z-score standardization on all numerical features to eliminate differences in units;

[0052] 5. PCA dimensionality reduction: Remove the target variable automation_risk_percent to avoid data leakage, perform PCA on the remaining highly correlated features, and retain the cumulative variance. The eight principal components eliminate multicollinearity. The values ​​are all close to 1, indicating no collinearity problem.

[0053] Step Two: Coding and Classification of Occupational Automation Risk Levels

[0054] The continuous target variable, occupational automated risk percentage, is categorized into three risk levels—low, medium, and high—based on a preset threshold, forming a three-class prediction task. Integer labels are used for coding, and the threshold is set as: automated risk percentage. Low risk Medium risk It is classified as high-risk. Specifically:

[0055] 1. Low risk: Percentage of automation risk The code is 0;

[0056] 2. Medium Risk: Percentage of Automated Risk The code is 1;

[0057] 3. High Risk: Percentage of Automation Risk The code is 2.

[0058] Step 3: Parallel Construction of Multiple Models

[0059] To address the problem of predicting the risk level of occupational automation in the labor market using artificial intelligence, this invention employs a comparative analysis of multiple machine learning classification models. To comprehensively evaluate the performance of different algorithms in this task, five representative mainstream classification models were selected, including Logistic Regression, Random Forest, AdaBoost (Adaptive Boosting), LightGBM (Light Gradient Boosting Machine), and XGBoost (Extreme Gradient Boosting). Their core principles and formulas are as follows.

[0060] Logistic Regression: Logistic regression is a classic probabilistic linear classification model that uses a logistic function to map linear combinations of input features to probability values ​​between 0 and 1, thereby distinguishing between different categories. Its model formula is as follows:

[0061]

[0062] in, It is an eigenvector. It is a weight coefficient vector. It is a vector dot product. It is a bias term. It is a natural constant. It is a logical function, defined as follows: , This represents the probability that a sample belongs to category 1 (high risk). Due to its simple model structure and parameters with clear economic meaning, it has high interpretability; each regression coefficient can reflect the direction and intensity of the corresponding feature's influence on changes in occupational automation risk levels.

[0063] Random Forest: Random Forest is a classification algorithm based on ensemble learning. It constructs multiple decision trees and uses a majority voting mechanism to obtain the final prediction result. For classes containing... Random forest of trees, samples Final prediction category Determined by the following formula:

[0064] in, Indicates the first The prediction output of each decision tree. This represents the mode. A single decision tree. During training, not only is the original training set automatically sampled, but a subset of features is also randomly selected from all features for optimal splitting at each node. This randomness effectively reduces model variance and prevents overfitting. In labor market data analysis, random forests can capture complex nonlinear relationships between different variables, such as the interactive effects of artificial intelligence technology applications, changes in skill structure, and occupational automation risks. Furthermore, random forests can provide feature importance ranking, helping to identify the key factors that have the greatest impact on occupational automation risks.

[0065] AdaBoost: AdaBoost is a typical boosting algorithm that iteratively trains multiple weak learners and continuously adjusts sample weights, causing subsequent models to focus more on samples that are difficult to classify. Its final prediction result is a weighted vote of the predictions from each weak classifier.

[0066] in, It is a symbolic function. It is the total number of weak classifiers. It is the first Weak classifier trained in rounds, Its weight is calculated using the following formula: , yes The weighted error rate. In occupational automated risk classification tasks, the risk boundaries between different occupations may be quite blurred. AdaBoost improves the overall classification performance by progressively strengthening its learning ability on these difficult samples.

[0067] LightGBM: LightGBM is a high-efficiency ensemble learning algorithm based on the gradient boosting framework. It uses an additive model and learns through a forward step-by-step algorithm. Its core is to fit the negative gradient (residual) of the current model. The model of the next iteration for:

[0068] in, It was before Ensemble prediction of wheel models It is the first The newly added decision tree, It refers to the learning rate. LightGBM's innovation lies in its use of a histogram-based splitting method and a leaf-wise growth strategy, which significantly improves training speed and memory efficiency while maintaining model accuracy. It can effectively handle the high-dimensional features in this study and capture complex nonlinear relationships, thereby improving the accuracy of automated occupational risk classification.

[0069] XGBoost: XGBoost is a high-performance gradient boosting decision tree algorithm that adds a regularization term to the loss function of traditional gradient boosting. objective function of the wheel It can be approximated as:

[0070] in, Total number of training samples and These are the first and second gradients of the loss function with respect to the current model's predicted values, respectively. It is the first The newly added base learner for the first round Sample The predicted output, This is a regularization term. Compared to traditional gradient boosting, XGBoost introduces second-order gradient information and regularization, which improves the model's predictive and generalization capabilities. In this invention, the intrinsic relationship between the development of artificial intelligence technology, changes in industry structure, and the risks of occupational automation can be fully explored, thereby improving prediction accuracy and the model's generalization ability.

[0071] Step 4: Performance Evaluation and Comparison of Multi-Dimensional Models

[0072] Use accuracy, precision, and recall. Fraction( -score) and The model performance is evaluated using multiple metrics, including Receiver Operating Characteristic - Area Under Curve. It is considered one of the important comprehensive evaluation indicators because it does not depend on a specific classification threshold and can comprehensively reflect the classification ability of the model under different decision thresholds.

[0073] Accuracy: Used to measure the proportion of correct predictions made by the model as a whole, that is, the proportion of all correctly classified samples out of the total number of samples. The formula is as follows:

[0074] Precision: This represents the proportion of samples that the model predicts to belong to a specific automated risk category, but which actually do not. This metric reflects the reliability of the model's predictions, and its calculation formula is as follows:

[0075] Recall: Represents the proportion of samples that correctly identify a given risk category out of all samples that actually belong to that category. This metric reflects the model's ability to identify high-risk or low-risk occupations. The formula for calculating recall is:

[0076] The score is the harmonic mean of precision and recall, used to comprehensively measure the model's balanced performance between precision and recall. It is particularly useful when there are differences in the distribution of data categories. The score provides a more comprehensive evaluation of model performance, and its calculation formula is as follows:

[0077] also, This is used to evaluate the overall performance of the model at different classification thresholds. The True Positive Rate (TPR) and False Positive Rate (FPR) are calculated at different thresholds, and then plotted. Find the curve and calculate the area under the curve. ). The value range is from 0 to 1, when When the value is close to 1, it indicates that the model has strong classification ability; when... When the value is close to 0.5, it indicates that the model's predictive ability is close to random guessing. The relevant calculation formula is as follows:

[0078]

[0079] In the above formula, This represents the number of samples that the model correctly predicted as belonging to a certain automated risk category. This represents the number of samples that were correctly predicted as other categories. This represents the number of samples that were incorrectly predicted as belonging to this category, while This represents the number of samples that truly belong to the category but were not correctly identified by the model. By comprehensively comparing these metrics, the predictive performance of different machine learning models in occupational automated risk classification tasks can be evaluated more fully.

[0080] The evaluation results are presented in various graphical formats:

[0081] (1) Bar chart comparing model performance

[0082] Figure 1 The performance of the five models on the first four classification metrics is presented in the form of a bar chart. It clearly shows that the logistic regression model has the advantage in all dimensions, XGBoost and LightGBM have similar performance and are second best, while the AdaBoost model has low overall performance.

[0083] (2) Each model Curve Comparison Chart

[0084] Figure 2 Five models were shown. The curves are compared, with the horizontal axis representing the false positive rate and the vertical axis representing the true positive rate. Each curve reflects the model's true positive rate at different classification thresholds. It's clear from the graph that the logistic regression model's curve almost touches the upper left corner, further confirming its... The value is the highest among all models ( It has strong classification capabilities. In contrast, the curve of the AdaBoost model deviates significantly from the upper left corner, and its lower... Consistent performance ).

[0085] (3) Confusion matrix heatmap

[0086] like Figure 3 As shown, by extracting key data from the confusion matrices of each model, the accuracy and false positive rate of high-risk classification were calculated, and the results are as follows:

[0087] Table 1. Accuracy and misclassification rate of high-risk classifications predicted by each model.

[0088] Since the overall accuracy of the AdaBoost model is relatively low, its accuracy in high-risk classification will not be considered at this time. Data shows that logistic regression models and ensemble learning models, especially random forests and XGBoost, have higher accuracy in identifying high-automation-risk jobs, with relatively lower false positive rates, demonstrating better classification capabilities.

[0089] After comparison: Logistic regression yielded the best overall index. XGBoost is suitable for large-scale rapid screening; it has the lowest high-risk false negative rate (approximately 100%). It is more suitable for accurate early warning of high-risk occupations.

[0090] Step 5: Feature Attribution Based on SHAP and Dual-Model Cross-Explanation

[0091] Logistic regression (linear representation) and XGBoost (non-linear representation) were selected to calculate the SHAP value for each feature. Based on game theory, the SHAP value can fairly quantify the contribution of each feature to a single prediction result, and its average absolute SHAP value can serve as a robust indicator of the global importance of a feature.

[0092] Calculate the mean absolute SHAP value for each feature and plot a ranking chart of the mean absolute SHAP values ​​for each feature. Figure 4 , Figure 5 ); and plot a scatter plot of the SHAP summary ( Figure 6 , Figure 7 This reveals the positive or negative influence of feature values ​​on the prediction results.

[0093] (1) Ranking of the mean absolute SHAP values ​​of each feature in the logistic regression model and the XGBoost model

[0094] Figure 4 The graph visually displays the global influence ranking of each feature. The vertical axis lists features in descending order of importance, and the horizontal axis represents their corresponding mean absolute value (SHAP). A larger SHAP value indicates a greater overall impact of the feature on the model's output. Analysis shows that the skill_gap_index has a significantly higher SHAP value than the other features. The fact that AI_disruption_intensity and retraining_urgency_score ranked first strongly suggests that, within the linear decision boundary of logistic regression, the gap between the workforce's current skills and the demands of the future AI era is the primary factor considered by the model when distinguishing risk levels. Following closely are the features AI_disruption_intensity and retraining_urgency_score. Notably, AI_replacement_score, typically considered a direct source of risk, did not rank in the top three. This ranking reveals a key finding: from a linear correlation perspective, the primary driver determining an occupation's risk level is not the possibility of technological substitution itself, but rather the gap in workers' preparedness to adapt to this substitution. The intensity of the technological shock and the urgency of retraining, acting as amplifiers amplifying the negative effects of this gap, together constitute the core dimensions of risk assessment.

[0095] Figure 5 The results show the importance ranking based on weighted calculations, i.e., the frequency with which features are used as split points. The results present a stark and insightful contrast to the logistic regression analysis: `ai_replacement_score` overwhelmingly ranks first, becoming the most influential predictor. While `skill_gap_index` and `reskilling_urgency_score` remain crucial, their relative rankings have shifted. This disruptive change in ranking indicates that when models are allowed to capture non-linear relationships, the direct, technological substitutability of work tasks by artificial intelligence instantly becomes the most fundamental and powerful driving force for predicting the risk of occupational automation. This aligns more closely with the basic intuition of the theory of technological unemployment and demonstrates that XGBoost can bypass the interference in linear models and directly pinpoint the technological root causes of risk.

[0096] (2) Scatter plot of SHAP summary of logistic regression model and XGBoost model

[0097] Figure 6This further reveals the specific direction and sample-level heterogeneity of the influence of these key features. The horizontal axis of the graph represents the SHAP value; negative values ​​indicate that the feature pushes the predicted probability towards lower risk, while positive values ​​push it towards higher risk. Each point represents a sample, and the redder the color, the higher the value of that sample on this feature. For the most important feature, skill_gap_index, a large number of high-value samples are clustered in the negative region of the SHAP horizontal axis, while low-value samples are mostly distributed near zero. This means that in a logistic regression model, the higher the skill gap index of a profession, the more the model tends to reduce the probability of it being predicted as a high-risk category. This counterintuitive phenomenon may stem from multicollinearity or masking effects: in linear models, skill_gap_index may be related to some uninitiated but protective latent variables, such as the high requirements of the profession for tacit knowledge or interpersonal interaction. These are inherently difficult for artificial intelligence to replace, but they also make it difficult to standardize and measure skills, causing its coefficient direction to be opposite to intuitive expectations. ai_disruption_intensity also exhibits a similar negative influence pattern. This finding highlights the limitations of purely linear models, suggesting that we need more complex models to clarify the true relationships between features.

[0098] Figure 7 This clearly depicts the specific form of this driving relationship. In the figure, for `ai_replacement_score`, a clear color gradient can be observed: the higher the feature value, i.e., the redder the sample color, the more concentrated its SHAP value is on the positive half-axis; the lower the feature value, i.e., the bluer the sample color, the more its SHAP value is biased towards the negative half-axis. This undeniably reveals a robust and monotonous positive relationship between AI replacement score and automation risk level—the degree to which an occupation can be automated is the most direct manifestation of its risk level. More importantly, observing `skill_gap_index` and `reskilling_urgency_score` reveals that they also exhibit a clear positive driving pattern in the XGBoost model, i.e., the larger the skills gap and the more urgent the retraining need, the higher the occupational risk. This is distinctly different from the negative relationship found in logistic regression, strongly demonstrating that XGBoost has successfully identified these factors and risks that are masked or distorted by linear models, and are more consistent with real-world logic. This association may be non-linear, for example, with a skill gap threshold where the risk increases sharply, or it may be achieved through the interaction effect with variables such as ai_replacement_score.

[0099] The comparison revealed that the skills gap index showed a negative correlation in logistic regression (an anomaly), while the AI ​​substitution score was the strongest positive factor in XGBoost, and the skills gap and retraining urgency also showed a positive driving effect. This invention, based on the attribution criteria of a nonlinear model, clarifies that the core driving factors of occupational automation risk are: AI substitution score, skills gap index, and retraining urgency index.

[0100] Step Six: Model Validation

[0101] To verify the generalization ability and stability of the constructed model, 10-fold cross-validation was performed on the selected model. Specifically, the training data was randomly divided into 10 subsets of similar size. One subset was selected as the validation set, and the remaining nine subsets were used as the training set, repeating this process 10 times. The mean absolute error (MAE) and coefficient of determination were calculated at each validation iteration. To avoid data leakage, all data preprocessing operations (including standardization and principal component analysis (PCA) were performed within each fold of the training data and applied to the corresponding validation set. The MAE and _____ of each model were recorded in 10 validation runs. Values, plot MAE box plots ( Figure 8 )and Line chart ( Figure 9 ).

[0102] Figure 8 The MAE distribution of each model in 10-fold cross-validation is shown, reflecting the average error level and the range of error fluctuation. It can be observed that the ensemble model has a low median and a relatively concentrated distribution, indicating good stability across different data partitions. However, some models have wide bins or outliers, suggesting some performance fluctuations across different partitions.

[0103] Figure 9 Showing different models at various folds Trends. Most models showed relatively stable performance across different folds without drastic fluctuations, indicating good overall robustness. The ensemble model generally maintained high performance across all folds. The level of performance validated its superior performance in this task.

[0104] Cross-validation showed that XGBoost maintained high performance across all trade-offs. The MAE level is low, and its fluctuation range is minimal, confirming its suitability for accurate identification tasks in high-risk occupations.

[0105] To demonstrate the effectiveness of the proposed dual-model collaborative method of logistic regression initial screening and XGBoost secondary screening, a comparative analysis is conducted based on the model performance evaluation results in step four above (see section —). In the prior art, although the single logistic regression model has the best overall accuracy and high computational efficiency, its high-risk category misclassification rate is [missing information]. (See below), meaning that approximately one-tenth of high-risk occupations are missed. The single XGBoost model performs better in identifying high-risk categories, with a false positive rate of [missing information]. However, its overall accuracy is slightly lower than that of logistic regression. Ensemble models such as random forests also suffer from a similar high-risk false negative problem (false positive rate). (And even higher). This demonstrates that a single model cannot simultaneously achieve both overall classification accuracy and high-risk sensitivity.

[0106] The method of this invention adopts a stratified assessment strategy: First, logistic regression is used to quickly screen all occupations, initially classifying them into low, medium, and high risk. For samples with medium or high risk results in the initial screening, the XGBoost model is used for further verification. The final risk level is based on the XGBoost's judgment of the high-risk category (i.e., if XGBoost determines it to be high-risk, it is ultimately classified as high-risk; otherwise, the initial screening result is retained). The theoretical advantage of this strategy is:

[0107] 1. Maintaining high overall accuracy: Logistic regression, as the first screening method, has the highest overall classification accuracy, which can ensure the reliability of large-scale occupational census.

[0108] 2. Significantly reduces the false positive rate for high-risk occupations: XGBoost has high sensitivity in identifying high-risk occupations, with a false positive rate of only [missing data]. As a verification step, it can effectively correct high-risk samples that may have been missed in the initial screening.

[0109] 3. Dual verification mechanism: Compared with a single model, the dual-model cross-judgment improves the robustness of decision-making and avoids systematic misjudgment due to the bias of a single model.

[0110] Based on the data in the original text, if logistic regression is used alone, the high-risk false negative rate is... Using XGBoost alone, the false negative rate is [missing information]. The method of this invention, through cascading use, can reduce the high-risk false negative rate to no higher than the lower of the two mentioned above, while maintaining an overall accuracy no lower than that of logistic regression used alone. The dual-model collaborative architecture of this invention has clear logical technical advantages and can effectively compensate for the shortcomings of existing single models in occupational risk prediction tasks.

[0111] In this embodiment, by establishing a risk prediction framework for occupational automation based on logistic regression and XGBoost models, and employing multi-dimensional evaluation indicators and SHAP interpretability analysis, a systematic modeling and validation of labor market data from multiple countries, industries, and occupations worldwide can provide the following insights for occupational automation risk assessment and labor market policy formulation:

[0112] First, the applicable scenarios for the models. Logistic regression offers the best overall performance and high computational efficiency, making it suitable for preliminary surveys and macro-level monitoring of large-scale occupational automation risks. XGBoost exhibits the lowest false negative rate in high-risk category identification and demonstrates strong stability through cross-validation, making it suitable for in-depth review and precise early warning of high-risk occupations. It is recommended to adopt a composite assessment system combining logistic regression for initial screening with XGBoost for further review.

[0113] Secondly, the core driving factors. The risk of occupational automation is jointly determined by the potential for technological substitution and the friction of skills adaptation. Among them, the artificial intelligence substitution score is the most direct positive driving factor (with the largest SHAP value); the skills gap index and the retraining urgency index significantly exacerbate the risk, and their impact shows a robust positive relationship in the nonlinear model.

[0114] Finally, policy recommendations are provided. For government departments, a tiered governance system combining macro-monitoring and precise intervention should be established; for educational institutions, the curriculum should be transformed to cultivate resilience against automation; for enterprises, simultaneous planning for technology introduction and human capital investment should be implemented; and for workers, lifelong learning and dynamic career planning should be advocated.

[0115] In summary, this invention, by constructing a multi-model comparison framework and introducing SHAP interpretability analysis, achieves accurate classification of occupational automation risk levels and reliable identification of core driving factors, thereby providing government departments, educational institutions, enterprises, and workers with hierarchical governance decision support that combines theoretical rigor with practical operability.

[0116] The descriptions and practices disclosed in this invention are readily apparent and understandable to those skilled in the art, and various modifications and refinements can be made without departing from the principles of this invention. Therefore, any modifications or improvements made without departing from the spirit of this invention should also be considered within the scope of protection of this invention.

Claims

1. A method for automated occupational risk prediction based on logistic regression and XGBoost models, characterized in that, Includes the following steps: Step 1: Data Acquisition and Preprocessing: Collect global cross-border and cross-industry occupational datasets, including more than 20 variables such as occupational automation risk percentage, artificial intelligence substitution score, skills gap index, and retraining urgency index; remove invalid label variables, use the isolation forest algorithm to remove outliers, perform One-Hot encoding on categorical variables, standardize numerical variables, and use principal component analysis (PCA) to eliminate multicollinearity; Step 2, Occupational Automation Risk Level Coding and Classification: The percentage of continuous occupational automation risk is classified into three risk levels—low, medium, and high—based on thresholds, forming a three-category task. Step 3: Parallel construction of multiple models: Simultaneously construct five classification models: Logistic Regression, Random Forest, AdaBoost, LightGBM, and XGBoost; Step 4: Multi-dimensional model performance evaluation: using accuracy, precision, recall, and... Fraction, The indicators were used to evaluate the models, and the best results were selected to use logistic regression for large-scale risk screening and XGBoost for accurate early warning of high-risk occupations. Step 5: Feature Attribution and Cross-Interpretation Based on SHAP: Calculate the SHAP value of each feature in the logistic regression and XGBoost models respectively, quantify the global importance of the features and reveal the direction of influence; The AI ​​substitution score, skills gap index, and retraining urgency index were identified as the core drivers of occupational automation risk. Step Six: Model Validation: 10-fold cross-validation is used, and the results are verified using MAE and... The indicators are used to test the model's generalization ability, error performance, and stability.

2. The occupational automated risk prediction method based on logistic regression and XGBoost models according to claim 1, characterized in that, In step one, the cumulative variance is preserved through principal component analysis (PCA). Principal components are used to eliminate multicollinearity.

3. The method for automated occupational risk prediction based on logistic regression and XGBoost models according to claim 1, characterized in that, In step two, the risk level classification threshold is: percentage of automated risk. For low risk, the percentage of automation risk is [missing information]. Medium risk, percentage of automated risk It is considered high-risk.

4. The method for automated occupational risk prediction based on logistic regression and XGBoost models according to claim 1, characterized in that, In step three, the logistic regression model formula is: ; in, It is an eigenvector. It is a weight coefficient vector. It is a vector dot product. It is a bias term. It is a natural constant. It is a logical function, defined as follows: , This indicates the probability that the sample belongs to category 1 (high risk).

5. The occupational automated risk prediction method based on logistic regression and XGBoost models according to claim 4, characterized in that, In step three, the formula for the random forest model is: ; in, Indicates the first The prediction output of each decision tree. Represents taking the mode, a single decision tree. During training, not only is the original training set automatically sampled, but a subset of features is also randomly selected from all features for optimal splitting at each node.

6. The method for automated occupational risk prediction based on logistic regression and XGBoost models according to claim 5, characterized in that, In step three, the AdaBoost model formula is: ; in, It is a symbolic function. It is the total number of weak classifiers. It is the first Weak classifier trained in rounds, Its weight is calculated using the following formula: , yes The weighted error rate.

7. The method for automated occupational risk prediction based on a logistic regression model and an XGBoost model according to claim 6, characterized in that, In step three, the LightGBM model formula is: ; in, It was before Ensemble prediction of wheel model It is the first The newly added decision tree, It is the learning rate.

8. The method for automated occupational risk prediction based on logistic regression and XGBoost models according to claim 7, characterized in that, In step three, the XGBoost model formula is: ; in, Total number of training samples and These are the first and second gradients of the loss function with respect to the current model's predicted values. It is the first The newly added base learner for the first round Sample The predicted output, It is a regularization term.

9. The method for automated occupational risk prediction based on logistic regression and XGBoost models according to claim 1, characterized in that, In step five, the skills gap index in the logistic regression model shows a negative correlation, while the AI ​​substitution score, skills gap index, and retraining urgency index in the XGBoost model all show positive driving forces. The attribution results of the nonlinear model are taken as the standard.

10. The method for automated occupational risk prediction based on logistic regression and XGBoost models according to claim 1, characterized in that, In step six, 10-fold cross-validation randomly divides the training data into 10 subsets. One subset is selected as the validation set, and the remaining nine subsets are used as the training set. This process is repeated 10 times to calculate the MAE and... To verify the stability of the model.