A driver driving style recognition method based on SHAP interpretation method and random forest
By combining the SHAP interpretation method with random forest, we can screen and identify driver driving styles, which solves the problems of high model complexity and poor real-time performance in traditional methods, and achieves accurate identification of driving styles and simplification of models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGSHA AUTOMOBILE INNOVATION RES INST
- Filing Date
- 2022-11-14
- Publication Date
- 2026-07-10
AI Technical Summary
Traditional methods struggle to accurately identify a driver's driving style, and existing machine learning models become overly complex and have poor real-time performance when the dimensionality of the training input information is too large.
We adopted a method combining SHAP interpretation and random forest to filter out effective feature parameters for driving style identification by dimensionless processing of driving signal features, and then used random forest decision trees for driving style identification.
It reduces the complexity of the driving style recognition model, improves the accuracy of driver driving style recognition and the real-time performance of the model, and enhances the interpretability and generalization ability of the model.
Smart Images

Figure CN115817499B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of driving style recognition technology, specifically a method for driver driving style recognition based on SHAP interpretation and random forest. Background Technology
[0002] The rapid development of intelligent vehicles has effectively alleviated current traffic problems such as frequent accidents and energy depletion. According to the American Automobile Association's (AAA) classification of autonomous driving levels, current research and technology in intelligent vehicles will remain at Level 2 to Level 3 autonomous driving for the foreseeable future. At Level 2 to Level 3, drivers will still play a crucial role in the current development of intelligent vehicles.
[0003] In reality, different drivers often exhibit distinct driving styles due to their driving experience, gender, occupation, and other factors. For example, an aggressive driver might rapidly and extensively press the accelerator or brake pedal to achieve significant acceleration or deceleration in a short time, satisfying their control over the vehicle's performance. Conversely, a cautious driver typically uses frequent, short-stroke presses on the accelerator or brake pedal to better adjust the vehicle's acceleration and deceleration characteristics, ensuring their safety. Therefore, most automakers and auto parts suppliers often prioritize driver styles when designing related products to meet drivers' preferences and needs as much as possible.
[0004] However, driving styles often exhibit strong randomness and uncertainty. Therefore, traditional rule-based or physics-based methods often struggle to accurately identify driving styles. Thanks to breakthroughs in key technologies such as artificial intelligence and advanced control theory, machine learning algorithms capable of handling complex, uncertain, and nonlinear problems are increasingly being applied in the field of driver style identification. However, accurately identifying driving styles relies on numerous vehicle motion characteristic signals. This makes it difficult to design driver style identification models using traditional single-method machine learning approaches, leading to problems such as excessive model complexity and poor real-time performance due to the large dimensionality of the training input information. Therefore, how to accurately identify driver styles with relatively low model complexity has become a pressing challenge. Summary of the Invention
[0005] This application provides a driver driving style identification method based on SHAP interpretation and random forest, which can reduce the complexity of driving style identification models and improve the accuracy of driver driving style identification. It solves the problems of excessive model complexity and poor real-time performance in the design of existing driver driving style identification models due to the large dimension of training input information.
[0006] The technical solution of this invention is described below in conjunction with the accompanying drawings:
[0007] A driver driving style identification method based on SHAP interpretation and random forest includes the following steps:
[0008] Step 1: Based on the collected raw driving data, select dimensional basic driving signals and perform dimensionless processing on the dimensional basic driving signals in the time and frequency domains to obtain dimensionless input feature parameters.
[0009] Step 2: Use the SHAP interpretation method to reduce the dimensionlessness of the input feature parameters, and select the dimensionlessness of the input feature parameters that are effective for identifying the driver's driving style from all the dimensionlessness of the input feature parameters.
[0010] Step 3: Design a driving style identification model based on the random forest machine learning algorithm. Input the dimensionless input feature parameters obtained after filtering in Step 2 into the driving style identification model based on the random forest machine learning algorithm to accurately identify the driver's driving style.
[0011] The specific method for step one is as follows:
[0012] 11) Determine the input feature parameters for the random forest machine learning theory;
[0013] 12) In the time domain and domain, waveform factor, peak factor, impulse factor, margin factor, centroid frequency, mean square frequency, and variance frequency are selected to perform dimensionless processing on 13 dimensional basic driving signals.
[0014] The specific method for step 11) is as follows:
[0015] Obtain key driving information from the driver during the driving process, including accelerator pedal opening p. t Engine torque T t Engine speed n t Brake master cylinder pressure P m Steering wheel angle S w Steering wheel speed Longitudinal acceleration a x Lateral acceleration a y Longitudinal vehicle speed v x Yaw rate ω, distance d from the target vehicle x Longitudinal speed difference v with the target vehicle d The difference in longitudinal acceleration between the target vehicle and the target vehicle, a d The system uses 13 dimensional basic driving signals, including those mentioned above, as input feature parameters for the random forest machine learning theory.
[0016] The specific method for step 12) is as follows:
[0017] The waveform factor is obtained by the following formula:
[0018]
[0019] In the formula, S1 represents the waveform factor; x(i) represents the discrete data of the dimensional basic driving signal; N represents the length of the discrete data of the dimensional basic driving signal.
[0020] The peak factor is obtained by the following formula:
[0021]
[0022] In the formula, S2 represents the peak factor;
[0023] The impulse factor is obtained by the following formula:
[0024]
[0025] In the formula, S3 represents the pulse factor;
[0026] The margin factor is obtained by the following formula:
[0027]
[0028] In the formula, S4 represents the margin factor;
[0029] The frequency of the center of gravity is obtained by the following formula:
[0030]
[0031] In the formula, S5 represents the center of gravity frequency; S(f) represents the spectrum of the dimensional basic driving signal; and f represents the frequency of the dimensional basic driving signal.
[0032] The mean square frequency is obtained by the following formula:
[0033]
[0034] In the formula, S6 represents the mean square frequency;
[0035] The variance frequency is obtained by the following formula:
[0036]
[0037] In the formula, S7 represents the variance frequency;
[0038] Based on formulas (1)-(7), the waveform factor, peak factor, impulse factor, margin factor, centroid frequency, mean square frequency, and variance frequency of 13 dimensional basic driving signals are dimensionlessly processed in the time and frequency domains, and finally 91 dimensionless input feature parameters A are obtained. j (j = 1, 2, ... 91).
[0039] The specific method for step two is as follows:
[0040] The SHAP interpretation method was used to analyze 91 dimensionless input feature parameters A. j (j = 1, 2, ..., 91) undergoes dimensionality reduction; the details are as follows:
[0041] Calculate 91 dimensionless input feature parameters A j The contribution of (j = 1, 2, ... 91) to driver driving style identification is numerically described by the SHAP value, which is obtained by the following formula:
[0042]
[0043] In the formula, A s The number of dimensionless input feature parameters is set to 91; A * A represents the dimensionless input feature parameter being interpreted; j (j = 1, 2, ..., 91) represents the j-th dimensionless input feature parameter; {A j} represents a single set consisting of the j-th dimensionless input feature parameter; G represents the set consisting of all dimensionless input feature parameters; G\{A j} means G excluding A j The set of dimensionless input feature parameters included after; S represents G\{A j A subset of}; φ j represents the SHAP value of the j-th dimensionless input feature parameter; f represents the interpreted random forest decision tree model;
[0044] According to formula (8), 91 dimensionless input feature parameters A are obtained. jThe SHAP value (j = 1, 2, ..., 91) for driver driving style identification is used to determine the contribution. The top 20 dimensionless input feature parameters by SHAP value are selected, and SHAP value curves for different dimensionless input feature parameters on driver driving style identification are plotted. When the SHAP value of a dimensionless input feature parameter for driver driving style identification is greater than or equal to 0.16, the dimensionless input feature parameter is considered effective in identifying driver driving style; when the SHAP value is less than 0.16, the dimensionless input feature parameter is considered ineffective in identifying driver driving style. Finally, the mean square frequency (A) including engine speed is determined. 68 The center-of-gravity frequency of the steering wheel angle is A. 57 The peak factor of steering wheel speed, i.e., A 19 The peak factor of the yaw rate, i.e., A 23 The mean square frequency of the brake master cylinder pressure, i.e., A 69 The waveform factor of the difference in longitudinal acceleration between the target vehicle and the target vehicle, i.e., A. 13 The peak factor of lateral acceleration, i.e., A 21 The pulse factor of engine torque, i.e., A 28 The variance frequency of the distance between the target vehicle and the target vehicle is A. 89 The longitudinal speed margin factor, namely A 48 The pulse factor of the accelerator pedal opening, i.e., A 27 The waveform factor of the longitudinal speed difference between the target vehicle and the target vehicle, i.e., A 12 Margin factor A of longitudinal acceleration 46 Thirteen dimensionless input feature parameters, including those from the random forest machine learning algorithm, are used as inputs to a low-dimensional identification model. These parameters are then sequentially combined with the mean square frequency of the engine speed, i.e., A... 68 The center frequency of the steering wheel angle is A. 57 The peak factor of steering wheel speed, i.e., A 19 Peak factor A of yaw rate 23 The mean square frequency of the brake master cylinder pressure, i.e., A 69 The waveform factor of the difference in longitudinal acceleration between the target vehicle and the target vehicle, i.e., A. 13 The peak factor of lateral acceleration, i.e., A 21 The pulse factor of engine torque, i.e., A 28 The variance frequency of the distance between the target vehicle and the target vehicle is A. 89 The longitudinal speed margin factor, namely A 48 The pulse factor of the accelerator pedal opening, i.e., A 27 The waveform factor of the longitudinal speed difference between the target vehicle and the target vehicle, i.e., A 12 The margin factor for longitudinal acceleration, namely A 46 Recorded as B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 B 11 B 12 B 13 B 14 B 15 .
[0045] The specific method for step three is as follows:
[0046] 31) Perform dimensionality reduction using the SHAP interpretation method on the training samples and perform random sampling with replacement to form a training set of n samples;
[0047] 32) Each sample training set is used as the root node for training the random forest decision tree; starting from the root node, the information purity of the input feature parameters of each training set is calculated; the Gini index is used to calculate the information purity of the input feature parameters, and the corresponding mathematical formula is:
[0048]
[0049] In the formula, B j (j = 1, 2, ..., 13) represents the j-th dimensionless input feature parameter obtained after dimensionality reduction using the SHAP interpretation method; Gini(D|B j ) represents the information purity of the j-th dimensionless input feature parameter obtained after dimensionality reduction using the SHAP interpretation method at the current random forest decision tree node; D represents the number of input samples at the current random forest decision tree node; D i C represents the number of dimensionless input feature parameters in the subset samples after partitioning according to the current random forest decision tree node's binary tree threshold; K represents the total number of driving style identification categories within the current random forest decision tree node's binary tree subset samples; C represents the total number of driving style identification categories within the current random forest decision tree node's binary tree subset samples. i,k This represents the number of samples with different driving styles within the subset of the current random forest decision tree node's binary tree.
[0050] 33) Select the input feature parameter corresponding to the minimum information purity as the best reference feature for splitting the nodes of the random forest decision tree, and perform decision tree growth and splitting; repeat the random forest decision tree node splitting process until the depth of the random forest decision tree is greater than or equal to the maximum tree depth, or the number of samples in the node is less than or equal to the minimum leaf node, then the random forest decision tree stops growing and obtains leaf nodes containing classification results; set the number of random forest decision trees to 100, the maximum tree depth to 13, and the minimum leaf node tree to 3;
[0051] 34) A training set of n randomly sampled samples is used to obtain n mutually independent random forest decision trees through node splitting. When the dimensionless input feature parameters are input to the root node of the random forest decision tree, different driving style identification results are obtained at their respective leaf nodes. The root nodes of the n random forest decision trees output n driving style identification results. According to the n driving style identification results, one vote is recorded for each of the following categories: Category 1 (cautious driver), Category 2 (general driver), and Category 3 (cautious driver). The vote counts for each category are counted, and the category with the most votes is selected as the final driver style identification output.
[0052] The beneficial effects of this invention are as follows:
[0053] 1) Solve for the initial input feature parameters suitable for driver driving style identification in the time and frequency domains;
[0054] 2) This invention uses the SHAP interpretation method to effectively eliminate initial input feature parameters that contribute little to the identification of driver driving style, and reasonably select initial input feature parameters that contribute much to the identification of driver driving style.
[0055] 3) This invention uses the SHAP interpretation method to reduce the complexity of driver driving style models based on random forest machine learning algorithms;
[0056] 4) The driver driving style identification model based on the random forest machine learning algorithm of this invention has the advantages of simple structure and strong interpretability, which is conducive to improving the generalization ability of the driver driving style identification model in different scenarios.
[0057] 5) The driver driving style identification model based on the random forest machine learning algorithm of this invention does not require precise model parameters, the algorithm calibration workload is small, and it has good application prospects. Attached Figure Description
[0058] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a schematic diagram of the process of the present invention;
[0060] Figure 2SHAP value curves for driver driving style identification with different dimensionless input feature parameters;
[0061] Figure 3 A schematic diagram of a driver driving style identification model based on the random forest machine learning algorithm;
[0062] Figure 4 This is a schematic diagram of the driver driving style identification results based on SHAP interpretation and random forest. Detailed Implementation
[0063] 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.
[0064] See Figure 1 A driver driving style identification method based on SHAP interpretation and random forest includes the following steps:
[0065] Step 1: Based on the collected raw driving data, select dimensional basic driving signals and perform dimensionless processing on the dimensional basic driving signals in the time and frequency domains to obtain dimensionless input feature parameters.
[0066] The specific method is as follows:
[0067] 11) Determine the input feature parameters for the random forest machine learning theory. The specific method is as follows:
[0068] Utilizing vehicle control units, mobile inertial navigation systems, and other equipment, key driving information of the driver during the driving process is obtained, including accelerator pedal opening p. t Engine torque T t Engine speed n t Brake master cylinder pressure P m Steering wheel angle S w Steering wheel speed Longitudinal acceleration a x Lateral acceleration a y Longitudinal vehicle speed v x Yaw rate ω, distance d from the target vehicle x Longitudinal speed difference v with the target vehicle d The difference in longitudinal acceleration between the target vehicle and the target vehicle, a d The system uses 13 dimensional basic driving signals, including those mentioned above, as input feature parameters for the random forest machine learning theory.
[0069] 12) Directly using the 13 dimensional basic driving signals as input feature parameters for the random forest machine learning algorithm can easily lead to the deployment of the trained driver style identification model being affected by fluctuations in the input feature parameters. Therefore, in the time domain and domain, waveform factor, peak factor, impulse factor, margin factor, centroid frequency, mean square frequency, and variance frequency are selected to perform dimensionless processing on the 13 dimensional basic driving signals.
[0070] Furthermore, the specific method for step 12) is as follows:
[0071] The waveform factor is obtained by the following formula:
[0072]
[0073] In the formula, S1 represents the waveform factor; x(i) represents the discrete data of the dimensional basic driving signal; N represents the length of the discrete data of the dimensional basic driving signal.
[0074] The peak factor is obtained by the following formula:
[0075]
[0076] In the formula, S2 represents the peak factor; x(i) represents the discrete data of the dimensional basic driving signal; N represents the length of the discrete data of the dimensional basic driving signal.
[0077] The impulse factor is obtained by the following formula:
[0078]
[0079] In the formula, S3 represents the pulse factor; x(i) represents the discrete data of the dimensional basic driving signal; N represents the length of the discrete data of the dimensional basic driving signal.
[0080] The margin factor is obtained by the following formula:
[0081]
[0082] In the formula, S4 represents the margin factor; x(i) represents the discrete data of the dimensional basic driving signal; N represents the length of the discrete data of the dimensional basic driving signal.
[0083] The frequency of the center of gravity is obtained by the following formula:
[0084]
[0085] In the formula, S5 represents the center of gravity frequency; S(f) represents the spectrum of the dimensional basic driving signal; and f represents the frequency of the dimensional basic driving signal.
[0086] The mean square frequency is obtained by the following formula:
[0087]
[0088] In the formula, S6 represents the mean square frequency; S(f) represents the spectrum of the dimensional basic driving signal, and f represents the frequency of the dimensional basic driving signal.
[0089] The variance frequency is obtained by the following formula:
[0090]
[0091] In the formula, S5 represents the center of gravity frequency; S7 represents the variance frequency; S(f) represents the spectrum of the dimensional basic driving signal; and f represents the frequency of the dimensional basic driving signal.
[0092] Based on formulas (1)-(7), the waveform factor, peak factor, impulse factor, margin factor, centroid frequency, mean square frequency, and variance frequency of 13 dimensional basic driving signals are dimensionlessly processed in the time and frequency domains, and finally 91 dimensionless input feature parameters A are obtained. j (j = 1, 2, ... 91), as shown in Table 1;
[0093] Table 1
[0094]
[0095]
[0096] Step 2: Use the SHAP interpretation method to reduce the dimensionality of the dimensionless input feature parameters, and select the dimensionless input feature parameters that are effective for identifying the driver's driving style from all the dimensionless input feature parameters.
[0097] The specific method is as follows:
[0098] The SHAP interpretation method was used to analyze 91 dimensionless input feature parameters A. j (j = 1, 2, ..., 91) undergoes dimensionality reduction; the details are as follows:
[0099] Calculate 91 dimensionless input feature parameters A j The contribution of (j = 1, 2, ... 91) to driver driving style identification is numerically described by the SHAP value, which is obtained by the following formula:
[0100]
[0101] In the formula, A s The number of dimensionless input feature parameters is set to 91; A * A represents the dimensionless input feature parameter being interpreted;j (j = 1, 2, ..., 91) represents the j-th dimensionless input feature parameter; {A j} represents a single set consisting of the j-th dimensionless input feature parameter; G represents the set consisting of all dimensionless input feature parameters; G\{A i} means G excluding A j The set of dimensionless input feature parameters included after; S represents G\{A i A subset of}; φ j represents the SHAP value of the j-th dimensionless input feature parameter; f represents the interpreted random forest decision tree model;
[0102] According to formula (8), 91 dimensionless input feature parameters A are obtained. j (j = 1, 2, ... 91) represents the SHAP value (i.e., contribution size) for driver driving style identification; the top 20 dimensionless input feature parameters with the highest SHAP values are selected, and plotted as follows: Figure 2 The diagram shows the SHAP value curves for different dimensionless input feature parameters in driver style identification. When the SHAP value of a dimensionless input feature parameter in driver style identification is greater than or equal to 0.16, the parameter is considered effective in identifying driver style; when the SHAP value is less than 0.16, the parameter is considered ineffective. Figure 2 In the curve, the mean square frequency of the engine speed, i.e., A, is a dimensionless input characteristic parameter. 68 The center-of-gravity frequency of the steering wheel angle is A. 57 The peak factor of steering wheel speed, i.e., A 19 The peak factor of the yaw rate, i.e., A 23 The mean square frequency of the brake master cylinder pressure, i.e., A 69 The waveform factor of the difference in longitudinal acceleration between the target vehicle and the target vehicle, i.e., A. 13 The peak factor of lateral acceleration, i.e., A 21 The pulse factor of engine torque, i.e., A 28 The variance frequency of the distance between the target vehicle and the target vehicle is A. 89 The longitudinal speed margin factor, namely A 48 The pulse factor of the accelerator pedal opening, i.e., A 27 The waveform factor of the longitudinal speed difference between the target vehicle and the target vehicle, i.e., A 12 The margin factor for longitudinal acceleration, namely A 46 The SHAP value is greater than 0.16, which can effectively distinguish between aggressive, moderate, and cautious driving styles within a relatively large SHAP value range. Compared with the above 13 dimensionless input feature parameters, the peak factor of the steering wheel angle, namely A... 18The waveform factor of the distance between the target vehicle and the target vehicle is A. 11 The impulse factor of longitudinal vehicle speed, i.e., A 35 The variance frequency of the difference between the longitudinal acceleration of the target vehicle and the target vehicle is A. 91 The frequency of the center of gravity of the lateral acceleration is A. 60 The center-of-gravity frequency of the steering wheel rotation speed is A. 58 The variance frequency of the longitudinal speed difference between the target vehicle and the target vehicle is A. 90 The SHAP value is less than 0.16, resulting in indistinct differences in the SHAP value ranges between aggressive, average, and cautious driving styles, making it impossible to accurately identify different driving styles. The remaining 71 dimensionless input feature parameters, which are not plotted and whose SHAP values are ranked lower, also suffer from the same deficiency.
[0103] Therefore, the mean square frequency A, which includes the engine speed, is finally determined. 68 The center-of-gravity frequency of the steering wheel angle is A. 57 The peak factor of steering wheel speed, i.e., A 19 Peak factor A of yaw rate 23 The mean square frequency of the brake master cylinder pressure, i.e., A 69 The waveform factor of the difference in longitudinal acceleration between the target vehicle and the target vehicle, i.e., A. 13 The peak factor of lateral acceleration, i.e., A 21 The pulse factor of engine torque, i.e., A 28 The variance frequency of the distance between the target vehicle and the target vehicle is A. 89 The longitudinal speed margin factor, namely A 48 The pulse factor of the accelerator pedal opening, i.e., A 27 The waveform factor of the longitudinal speed difference between the target vehicle and the target vehicle, i.e., A 12 The margin factor for longitudinal acceleration, namely A 46 The 13 dimensionless input feature parameters, including those from the random forest machine learning algorithm, are used as inputs to the low-dimensional identification model in step three, and the mean square frequency of engine speed, i.e., A, is then used sequentially. 68 The center frequency of the steering wheel angle is A. 57 The peak factor of steering wheel speed, i.e., A 19 Peak factor A of yaw rate 23 The mean square frequency of the brake master cylinder pressure, i.e., A 69 The waveform factor of the difference in longitudinal acceleration between the target vehicle and the target vehicle, i.e., A. 13 The peak factor of lateral acceleration, i.e., A 21 The pulse factor of engine torque, i.e., A 28 The variance frequency of the distance between the target vehicle and the target vehicle is A. 89 The longitudinal speed margin factor, namely A 48 The pulse factor of the accelerator pedal opening, i.e., A27 The waveform factor of the longitudinal speed difference between the target vehicle and the target vehicle, i.e., A 12 The margin factor for longitudinal acceleration, namely A 46 Recorded as B1, B2, B3, B4, B5, B6, B7, B8, B9, B 10 B 11 B 12 B 13 B 14 B 15 This will facilitate subsequent analysis.
[0104] Step 3: While complex machine learning algorithms such as neural networks and ensemble learning can accurately identify different driving styles through multi-parameter fitting, they also suffer from high model complexity and poor interpretability. Therefore, this invention selects the random forest machine learning algorithm, which is simple in structure, highly interpretable, and computationally inefficient, to design a driver driving style identification model.
[0105] Driving style recognition model based on random forest machine learning algorithm, such as Figure 3 As shown, the dimensionless input feature parameters obtained after filtering in step two are input into the driving style recognition model based on the random forest machine learning algorithm to accurately identify the driver's driving style. The specific method is as follows:
[0106] 31) Perform dimensionality reduction using the SHAP interpretation method on the training samples and perform random sampling with replacement to form a training set of n samples;
[0107] 32) Each sample training set is used as the root node for training the random forest decision tree; starting from the root node, the information purity of the input feature parameters of each training set is calculated; the Gini index, which is simple in structure and fast in computation, is used to calculate the information purity of the input feature parameters, and the corresponding mathematical formula is:
[0108]
[0109] In the formula, B j (j = 1, 2, ..., 13) represents the j-th dimensionless input feature parameter obtained after dimensionality reduction using the SHAP interpretation method; Gini(D|B j ) represents the information purity of the j-th dimensionless input feature parameter obtained after dimensionality reduction using the SHAP interpretation method at the current random forest decision tree node; D represents the number of input samples at the current random forest decision tree node; D i C represents the number of dimensionless input feature parameters in the subset samples after partitioning according to the current random forest decision tree node's binary tree threshold; K represents the total number of driving style identification categories within the current random forest decision tree node's binary tree subset samples; C represents the total number of driving style identification categories within the current random forest decision tree node's binary tree subset samples. i,kThis represents the number of samples with different driving styles within the subset of the current random forest decision tree node's binary tree.
[0110] 33) Select the input feature parameter corresponding to the minimum information purity as the best reference feature for splitting the random forest decision tree node, and perform decision tree growth and splitting. Repeat the random forest decision tree node splitting process until the depth of the random forest decision tree is greater than or equal to the maximum tree depth, or the number of samples in the node is less than or equal to the minimum leaf node. At this point, the random forest decision tree stops growing and obtains a leaf node containing the classification results. Set the number of random forest decision trees to 100, the maximum tree depth to 13, and the minimum leaf node tree to 3.
[0111] 34) A training set of n randomly sampled samples can be used to obtain n independent random forest decision trees through node splitting. When the dimensionless input feature parameters are input to the root node of the random forest decision tree, different driving style identification results are obtained at their respective leaf nodes. The root nodes of the n random forest decision trees output n driving style identification results. Based on the n driving style identification results, one vote is recorded for each of the following categories: Category 1 (cautious driver), Category 2 (general driver), and Category 3 (cautious driver). The vote counts for each category are counted, and the category with the most votes is selected as the final driver style identification output.
[0112] Through the above three steps, we finally obtained a driving style recognition model based on SHAP interpretation and random forest. Figure 4 This represents the identification results of 46 sets of driver driving style test data. The experimental curves show that the identification accuracy for cautious, average, and aggressive driver styles reached 92.86%, 93.75%, and 93.75%, respectively. Therefore, the driving style identification algorithm designed in this patent can achieve accurate identification of different driver styles with fewer model input feature parameters.
[0113] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present invention will not describe the various possible combinations separately.
[0114] Furthermore, various different embodiments of the present invention can be combined in any way, as long as they do not violate the spirit of the present invention, they should also be regarded as the content disclosed by the present invention.
Claims
1. A driver driving style identification method based on SHAP interpretation and random forest, characterized in that, Includes the following steps: Step 1: Based on the collected raw driving data, select dimensional basic driving signals and perform dimensionless processing on the dimensional basic driving signals in the time and frequency domains to obtain dimensionless input feature parameters. Step 2: Use the SHAP interpretation method to reduce the dimensionlessness of the input feature parameters, and select the dimensionlessness of the input feature parameters that are effective for identifying the driver's driving style from all the dimensionlessness of the input feature parameters. Step 3: Design a driving style identification model based on the random forest machine learning algorithm. Input the dimensionless input feature parameters obtained after filtering in Step 2 into the driving style identification model based on the random forest machine learning algorithm to accurately identify the driver's driving style. The specific method for step one is as follows: 11) Determine the input feature parameters for the random forest machine learning theory; 12) In the time domain and domain, waveform factor, peak factor, impulse factor, margin factor, centroid frequency, mean square frequency, and variance frequency are selected to perform dimensionless processing on 13 dimensional basic driving signals. The specific method for step 12) is as follows: The waveform factor is obtained by the following formula: (1) In the formula, Indicates waveform factor; Discrete data representing dimensional driving signals; This represents the discrete data length of a dimensional driving signal. The peak factor is obtained by the following formula: (2) In the formula, Indicates the peak factor; The impulse factor is obtained by the following formula: (3) In the formula, Indicates the pulse factor; The margin factor is obtained by the following formula: (4) In the formula, Indicates the margin factor; The frequency of the center of gravity is obtained by the following formula: (5) In the formula, Indicates the centroid frequency; The spectrum representing a dimensionally based driving signal; This represents the frequency of a dimensionless driving signal; The mean square frequency is obtained by the following formula: (6) In the formula, Indicates the mean square frequency; The variance frequency is obtained by the following formula: (7) In the formula, Indicates the variance frequency; Based on formulas (1) to (7), the waveform factor, peak factor, impulse factor, margin factor, centroid frequency, mean square frequency, and variance frequency of 13 dimensional basic driving signals are dimensionlessly processed in the time and frequency domains, and finally 91 dimensionless input feature parameters are obtained. .
2. The driver driving style identification method based on SHAP interpretation and random forest according to claim 1, characterized in that, The specific method for step 11) is as follows: Obtain key driving information from the driver during the driving process, including accelerator pedal opening. Engine torque Engine speed Brake master cylinder pressure Steering wheel angle Steering wheel speed Longitudinal acceleration Lateral acceleration Longitudinal speed yaw rate Distance between the target vehicle and the target vehicle Longitudinal speed difference with the target vehicle Longitudinal acceleration difference with the target vehicle The system uses 13 dimensional basic driving signals, including those mentioned above, as input feature parameters for the random forest machine learning theory.
3. The driver driving style identification method based on SHAP interpretation and random forest according to claim 1, characterized in that, The specific method for step two is as follows: The SHAP interpretation method was used to analyze 91 dimensionless input feature parameters. Dimensionality reduction is performed; details are as follows: Calculate 91 dimensionless input feature parameters The contribution of the driver's driving style identification is described by the SHAP value, which is obtained by the following formula: In the formula, This represents the number of dimensionless input feature parameters, set to 91. Represents the dimensionless input feature parameters being interpreted; Indicates the first One dimensionless input feature parameter; Indicates by the first A single set consisting of dimensionless input feature parameters; It represents the set consisting of all dimensionless input feature parameters; express remove The set of dimensionless input feature parameters included thereafter; express A subset of; Indicates the first The SHAP value of a dimensionless input feature parameter; This represents the interpreted random forest decision tree model; According to formula (8), 91 dimensionless input feature parameters are obtained. The SHAP value, or contribution, is used to identify the driver's driving style. The top 20 dimensionless input feature parameters by SHAP value are selected, and SHAP value curves for different dimensionless input feature parameters on driver driving style identification are plotted. When the SHAP value of a dimensionless input feature parameter on driver driving style identification is greater than or equal to 0.16, the dimensionless input feature parameter is considered effective in identifying the driver's driving style; when the SHAP value is less than 0.16, the dimensionless input feature parameter is considered ineffective in identifying the driver's driving style. Finally, the mean square frequency including engine speed is determined. The frequency of the center of gravity when the steering wheel turns is... The peak factor of steering wheel speed is The peak factor of yaw rate is The mean square frequency of the brake master cylinder pressure is... The waveform factor of the difference in longitudinal acceleration between the target vehicle and the target vehicle. The peak factor of lateral acceleration is The pulse factor of engine torque is The variance frequency of the distance between the target vehicle and the target vehicle. The longitudinal speed margin factor is... The pulse factor of the accelerator pedal opening is The waveform factor of the longitudinal speed difference with the target vehicle is... Margin factor of longitudinal acceleration Thirteen dimensionless input feature parameters, including the engine speed mean square frequency, are used as inputs to a low-dimensional identification model based on the random forest machine learning algorithm. The center frequency of the steering wheel angle is The peak factor of steering wheel speed is Peak factor of yaw rate The mean square frequency of the brake master cylinder pressure is... The waveform factor of the difference in longitudinal acceleration between the target vehicle and the target vehicle. The peak factor of lateral acceleration is The pulse factor of engine torque is The variance frequency of the distance between the target vehicle and the target vehicle. The longitudinal speed margin factor is... The pulse factor of the accelerator pedal opening is The waveform factor of the longitudinal speed difference with the target vehicle is... The margin factor of longitudinal acceleration is... Recorded as , , 、 、 、 、 、 、 、 、 、 、 。 4. The driver driving style identification method based on SHAP interpretation and random forest according to claim 3, characterized in that, The specific method for step three is as follows: 31) Perform dimensionality reduction using the SHAP interpretation method on the training samples and perform random sampling with replacement to form a training set of n samples; 32) Each sample training set is used as the root node for training the random forest decision tree; starting from the root node, the information purity of the input feature parameters of each training set is calculated; the Gini index is used to calculate the information purity of the input feature parameters, and the corresponding mathematical formula is: In the formula, The dimensionality reduction obtained after SHAP interpretation is represented as the 1st dimension. One dimensionless input feature parameter; The dimensionality reduction obtained after SHAP interpretation is represented as the 1st dimension. The information purity of a dimensionless input feature parameter at the current random forest decision tree node; This indicates the number of input samples for the current random forest decision tree node; This represents the number of subset samples after the binary tree threshold of the current random forest decision tree node is divided according to the dimensionless input feature parameters. This represents the total number of driving style identification categories within the current random forest decision tree node's binary tree subset sample; This represents the number of samples with different driving styles within the subset of the current random forest decision tree node's binary tree. 33) Select the input feature parameter corresponding to the minimum information purity as the best reference feature for splitting the nodes of the random forest decision tree, and perform decision tree growth and splitting; repeat the random forest decision tree node splitting process until the depth of the random forest decision tree is greater than or equal to the maximum tree depth, or the number of samples in the node is less than or equal to the minimum leaf node, then the random forest decision tree stops growing and obtains leaf nodes containing classification results; set the number of random forest decision trees to 100, the maximum tree depth to 13, and the minimum leaf node tree to 3; 34) A training set of n randomly sampled samples is used to obtain n independent random forest decision trees through node splitting. When the dimensionless input feature parameters are input to the root node of the random forest decision tree, different driving style identification results are obtained at their respective leaf nodes. The root nodes of the n random forest decision trees output n driving style identification results. Based on the n driving style identification results, one vote is recorded for each of the following categories: Category 1 (cautious driver), Category 2 (general driver), and Category 3 (cautious driver). The vote counts for each category are counted, and the category with the most votes is selected as the final driver style identification output.