Customer complaint risk prediction method based on random forest algorithm

By calculating relevant indicators of influencing factors and complaint types and adjusting the depth of the decision tree, the problem of unreasonable decision tree depth in the prediction of complaint frequency is solved, and the accuracy and reliability of complaint prediction are improved.

CN119295090AActive Publication Date: 2025-01-10国网新疆电力有限公司营销服务中心
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411318220.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-10
Estimated Expiration
2044-09-20

AI Technical Summary

Technical Problem

When using the random forest algorithm to predict customer complaint frequency, the degree of correlation difference between influencing factors for complaint types and the necessity of parent nodes in the data segmentation process are ignored, resulting in unreasonable construction of decision tree depth, reducing the accuracy of complaint prediction sex.

Method used

By obtaining complaint timing data and influencing factors in different local areas, we calculate the relevant indicators of influencing factors and complaint types, and adjust the initial depth of the decision tree according to the performance of the decision tree to ensure that the depth of the decision tree is more reasonable, thereby improving predictions accuracy.

Benefits of technology

By adjusting the depth of the decision tree, the reliability of customer complaint prediction is improved, accurately reflects the degree of impact of influencing factors on different complaint types, and enhances the predictive ability of local regional complaint types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295090A_ABST
    Figure CN119295090A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of complaint risk prediction, in particular to a customer complaint risk prediction method based on a random forest algorithm. The method comprises the following steps: firstly, obtaining related indexes of influence factors and complaint types in a target area; according to the numerical distribution of all complaint data in the data set of the father node, the related indexes of each influence factor and complaint type and the performance of the decision tree, the initial depth of the decision tree is adjusted, and the adjusted depth of the decision tree is obtained; and obtaining predicted complaint data of each complaint type of each local area according to the adjusted depth of each decision tree corresponding to the same complaint type of the target area. According to the method, the adjusted depth is more reasonable and the prediction reliability is improved by combining the difference of the influence factors on the correlation degree between complaint types and the necessity of the father node in the data segmentation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of complaint risk prediction, and in particular to a customer complaint risk prediction method based on a random forest algorithm. Background Art

[0002] Customers can complain about problems encountered during power supply and use through the customer service hotline. Customer complaints can help identify deficiencies in our services. Customer complaints can be classified into five types of complaints: frequent power outages, overtime repairs, long-term abnormal voltage quality, overtime for business expansion and installation, and other types. Targeted improvement measures can then be taken for each type of complaint. Predicting customer complaints can help quickly repair fault points, ensure the quality of electricity used by users, and reduce power service risks.

[0003] Since the complaint frequency of complaint types is affected by many factors, for example, factors such as weather severity, electricity consumption, and dissatisfaction with manual services will affect customer satisfaction with electricity, and thus affect the complaint frequency of complaint types, the random forest algorithm is a common method that can combine influencing factors to predict the customer's complaint frequency. However, when using the random forest algorithm to predict the complaint frequency, the differences in the degree of correlation between influencing factors on complaint types and the necessity of parent nodes in the data segmentation process are ignored, resulting in unreasonable depth construction of the decision tree and reduced accuracy of complaint prediction. Summary of the invention

[0004] In order to solve the technical problem that the depth of decision tree is unreasonable when predicting the frequency of complaints, which reduces the accuracy of complaint prediction, the purpose of the present invention is to provide a customer complaint risk prediction method based on random forest algorithm. The technical solution adopted is as follows:

[0005] A customer complaint risk prediction method based on a random forest algorithm, the method comprising the following steps:

[0006] Obtain complaint time series data of all complaint types in different local areas, and influence time series data of all influencing factors; the complaint time series data includes complaint data at all historical moments; the influence time series data includes influence data at all historical moments;

[0007] Any local area is taken as a target area; in the target area, according to the correlation between the complaint time series data and the impact time series data, and the difference between the complaint data corresponding to the target area and all local areas, the relevant indicators of the influencing factors and complaint types in the target area are obtained;

[0008] In the same complaint type in the target area, based on the complaint data at all historical moments and the impact data of all influencing factors at all historical moments, the data set of all parent nodes of each decision tree and the initial depth of each decision tree are obtained; in the decision tree, based on the numerical distribution of all the complaint data in the data set of the parent node, the relevant indicators of each influencing factor and complaint type, and the performance of the decision tree, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree;

[0009] According to the adjusted depth of each decision tree corresponding to the same complaint type in the target area, the predicted complaint data of each complaint type in each local area is obtained.

[0010] Furthermore, the method for obtaining the relevant indicators specifically includes:

[0011] According to the correlation between the complaint time series data and the impact time series data, obtaining the correlation factors of the impact factors and the complaint types in the target area;

[0012] In the same complaint type, according to the concentration trend of the complaint data in each local area, the complaint concentration factor of each local area is obtained;

[0013] According to the difference between the target area and all the local areas in the complaint concentration factor and the complaint concentration factor of the target area, obtaining an adjustment parameter of the target area in the complaint type;

[0014] According to the adjustment parameters, the correlation factors of the influencing factors and complaint types in the target area are adjusted to obtain the correlation indicators of the influencing factors and complaint types in the target area; the adjustment parameters and the correlation factors are positively correlated with the correlation indicators.

[0015] Furthermore, the method for obtaining the correlation factor includes:

[0016] The absolute value of the Pearson correlation coefficient between the complaint time series data and the impact time series data is calculated to obtain the correlation factor between the impact factor and the complaint type in the target area.

[0017] Furthermore, the method for obtaining the adjustment parameter includes:

[0018] In the same complaint type, the absolute value of the difference between the complaint concentration factor of the target area and the complaint concentration factor of each local area is calculated to obtain the local deviation factor of each local area;

[0019] Calculate the mean of the local deviation factors of all the local areas to obtain the complaint deviation parameter of the target area;

[0020] According to the complaint deviation parameter of the target area and the complaint concentration factor of the target area, the adjustment parameter of the target area in the complaint type is obtained; the complaint deviation parameter and the adjustment parameter are positively correlated; the complaint concentration factor of the target area and the adjustment parameter are negatively correlated.

[0021] Furthermore, the method for obtaining the adjusted depth includes:

[0022] Obtaining a simplifiable index of the parent node according to the numerical distribution of all the complaint data in the data set of the parent node and the relevant index of each influencing factor and complaint type;

[0023] According to the simplifiable index of the parent node and the performance of the decision tree, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree.

[0024] Furthermore, the method for obtaining the simplifiable indicator includes:

[0025] Obtaining a distribution concentration factor of the parent node according to the distribution concentration of all the complaint data in the data set of the parent node;

[0026] Obtaining a distribution dispersion factor of the parent node according to the distribution differences of all the complaint data in the data set of the parent node;

[0027] According to the relevant indicators, distribution concentration factor and distribution dispersion factor of the influencing factors and complaint types corresponding to the parent node, the simplifiable indicators of the parent node are obtained; the relevant indicators and the distribution dispersion factor are negatively correlated with the simplifiable indicators; the distribution concentration factor is positively correlated with the simplifiable indicators.

[0028] Furthermore, the method for obtaining the distribution concentration factor includes:

[0029] In the data set of the parent node, all the complaint data are sorted in order from small to large to obtain the complaint data sequence of the parent node; the mean of the differential values ​​of all complaint data points in the complaint data sequence is calculated to obtain the overall dispersion parameter; the overall dispersion parameter is negatively correlated and mapped to obtain the distribution concentration factor of the parent node.

[0030] Furthermore, the method for obtaining the distribution dispersion factor includes:

[0031] In the data set of the parent node, the absolute value of the difference between every two complaint data is obtained, and the maximum absolute value of the difference is used as the distribution dispersion factor of the parent node.

[0032] Furthermore, the method for obtaining the adjusted depth includes:

[0033] Obtaining an evaluation function of a decision tree and a level of the decision tree; obtaining a performance factor of the decision tree according to the evaluation function of the decision tree and the level of the decision tree; the evaluation function and the performance factor are negatively correlated, and the level and the performance factor are negatively correlated;

[0034] The simplifiable indicators of all parent nodes in the decision tree are integrated to obtain the overall simplifiable parameters of the decision tree;

[0035] According to the overall simplifiable parameter and the performance factor of the decision tree, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree; the initial depth and the performance factor are positively correlated with the adjusted depth, and the overall simplifiable parameter is negatively correlated with the adjusted depth.

[0036] Furthermore, the method for obtaining the overall simplified parameters includes:

[0037] The cumulative values ​​of the reducible indicators of all parent nodes in the decision tree are calculated and normalized to obtain the overall reducible parameters of the decision tree.

[0038] The present invention has the following beneficial effects:

[0039] Because in local areas, the types of complaints are affected by the influencing factors of the local area; for example, when the power consumption is at peak times, the voltage quality is abnormal due to excessive load, which often leads to a significant increase in the number of complaints corresponding to the type of long-term abnormal voltage quality; when the weather is bad and the external power transmission equipment fails and causes power outages, the number of complaints corresponding to the type of frequent power outages often increases significantly; when the repair timeout or packaging timeout caused by manual service problems often leads to a significant increase in the number of complaints corresponding to the type of business expansion and installation overtime; the degree of influence of the influencing factors on the above different complaint types is different, and the relevant indicators of the influencing factors and complaint types in the target area are obtained. The larger the relevant index, the greater the degree of influence of the influencing factors on the complaint type in the target area.

[0040] In order to predict the complaint data of all complaint types in the local area, the random forest algorithm is first used to construct a decision tree and obtain the initial depth of the decision tree. Considering that the initial depth of the decision tree ignores the correlation between the influencing factors on the complaint types and ignores the necessity of the data segmentation process of some parent nodes, and since the depth of the decision tree affects the prediction results, the initial depth of the decision tree is adjusted to make the adjusted depth more reasonable and improve the reliability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A flowchart of a customer complaint risk prediction method based on a random forest algorithm provided by an embodiment of the present invention;

[0043] Figure 2 A flow chart of a method for obtaining relevant indicators provided by an embodiment of the present invention;

[0044] Figure 3 A flow chart of a method for obtaining a simplified indicator provided by an embodiment of the present invention;

[0045] Figure 4 A flow chart of a method for obtaining adjusted depth provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the customer complaint risk prediction method based on the random forest algorithm proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0047] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0048] The following is a detailed description of a specific solution of a customer complaint risk prediction method based on a random forest algorithm provided by the present invention in conjunction with the accompanying drawings.

[0049] See also Figure 1 , which shows a flowchart of a customer complaint risk prediction method based on a random forest algorithm provided by an embodiment of the present invention, the method comprising the following steps:

[0050] Step S1, obtaining complaint time series data of all complaint types in different local areas, and influence time series data of all influencing factors; the complaint time series data includes complaint data at all historical moments; the influence time series data includes influence data at all historical moments.

[0051] Taking into account the different complaint behaviors in different local areas, in order to predict the complaint behavior of each complaint type in the local area, it is necessary to conduct an in-depth analysis of the historical complaint behavior of each complaint type in different local areas and analyze various influencing factors.

[0052] Specifically, considering that customer complaints can be divided into frequent power outage complaint types, emergency repair overtime complaint types, voltage quality long-term abnormal complaint types, business expansion and installation overtime complaint types and other complaint types, the present invention uses these five complaint types as all complaint types. Power equipment points are distributed in different regions. The difference between complaint behaviors in different regions can reflect the sensitivity of regional power equipment and affect the reliability of subsequent analysis of the correlation between influencing factors and complaint types. Therefore, it is necessary to study equipment with different spatial distributions separately, that is, to obtain the local area to which the data belongs from the complaint monitoring system.

[0053] In order to analyze the number of user complaints of different complaint types in different local areas, for the same complaint type in the same local area, the monitoring system is used to add up the cumulative value of all complaint times corresponding to the complaint type in the local area in the preset time interval as the complaint data of the preset time interval; then the complaint data of each preset time interval in the historical reference interval is obtained; the preset time interval is taken as a historical moment, and the complaint data of all historical moments in the historical reference interval are counted in sequence according to the order of historical moments as the complaint time series data of this complaint type in the local area.

[0054] Considering that the number of complaints is affected by a variety of influencing factors, the influencing factors in different local areas are different and the influencing factors at different times may also be different. For example, the influencing factors are the severity of weather, electricity consumption, and dissatisfaction with manual service. It is necessary to obtain the complaint time series data of all types of complaints in different local areas. In one embodiment of the present invention, the severity of weather, electricity consumption, and dissatisfaction with manual service are used as all influencing factors; the method for obtaining the impact time series data of all types of influencing factors in a local area is as follows:

[0055] For the factors affecting the severity of weather, the monitoring system is used to obtain the severity of weather scores, and the severity of weather scores of the local area in the preset time interval are used as the impact data of the preset time interval; for the factors affecting power consumption, the monitoring system is used to obtain power consumption, and the accumulated value of power consumption in the local area in the preset time interval is used as the impact data of the preset time interval; for the factors affecting the degree of dissatisfaction with manual service, the monitoring system is used to obtain the degree of dissatisfaction with manual service scores; the average value of the degree of dissatisfaction with manual service scores of the local area in the preset time interval is used as the impact data of the preset time interval;

[0056] For any influencing factor in the local area, the impact data of each preset time interval in the historical reference interval is obtained; the preset time interval is regarded as a historical moment, and the impact data of all historical moments in the historical reference interval are sequentially counted in the order of the historical moments as the impact time series data of the influencing factor in the local area; finally, the impact time series data of all kinds of influencing factors in the local area are obtained.

[0057] In one embodiment of the present invention, the preset time interval is from the beginning to the end of a day, the historical reference interval is 100 days, and the last day of the historical reference interval is the day before the current moment, which can be set by the implementer according to the implementation scenario. It should be noted that the present invention analyzes any local area and obtains the predicted complaint data of each complaint type corresponding to the local area.

[0058] It should be noted that, in order to facilitate calculation, all indicator data involved in the calculation in the embodiment of the present invention are preprocessed to eliminate the dimension effect. The specific means of eliminating the dimension effect are technical means well known to those skilled in the art and are not limited here.

[0059] Step S2, taking any local area as the target area; in the target area, according to the correlation between the complaint time series data and the impact time series data, and the difference between the complaint data corresponding to the target area and all local areas, obtain the relevant indicators of the influencing factors and complaint types in the target area.

[0060] Because in local areas, the types of complaints are affected by the influencing factors of the local area; for example, when the power consumption during peak hours causes excessive load and abnormal voltage quality, the number of complaints corresponding to the type of long-term abnormal voltage quality often increases significantly; when the weather is bad and the external power transmission equipment fails and causes power outages, the number of complaints corresponding to the type of frequent power outages often increases significantly; when the repair timeout or packaging timeout caused by manual service problems often leads to a significant increase in the number of complaints corresponding to the type of business expansion and installation overtime; the degree of influence of the influencing factors on the above different complaint types is different to a certain extent, and the relevant indicators of the influencing factors and complaint types in the target area are obtained. The larger the relevant index, the greater the degree of influence of the influencing factors on the complaint type in the target area.

[0061] See also Figure 2 , which shows a flow chart of a method for obtaining relevant indicators provided by an embodiment of the present invention. Preferably, in an embodiment of the present invention, since the stability of power equipment and the quality of power service in different local areas are different, the degree of influence of influencing factors on complaint types will be different. The relevant indicators of influencing factors and complaint types in the target area are obtained. The method for obtaining relevant indicators specifically includes:

[0062] Step S201: Obtaining correlation factors of influencing factors and complaint types in the target area according to the correlation between complaint time series data and impact time series data;

[0063] The correlation factor is obtained through the correlation between the complaint time series data and the impact time series data. The larger the correlation factor is, the more correlated the complaint time series data is with the impact time series data.

[0064] In one embodiment of the present invention, the absolute value of the Pearson correlation coefficient between the complaint time series data and the impact time series data is calculated to obtain the correlation factor between the impact factor and the complaint type in the target area, and the correlation is reflected by the absolute value of the Pearson correlation coefficient. It should be noted that the Pearson correlation coefficient is a prior art well known to those skilled in the art and will not be described in detail here. In other embodiments of the present invention, the absolute value of the Chebyshev correlation coefficient between the complaint time series data and the impact time series data can also be calculated to obtain the correlation factor between the impact factor and the complaint type in the target area.

[0065] Step S202: in the same complaint type, according to the concentration trend of complaint data in each local area, obtaining the complaint concentration factor of each local area;

[0066] The complaint concentration factor can reflect the overall concentration characteristics of all complaint data in a local area in a complaint type. In one embodiment of the present invention, the mean of all complaint data in the same complaint type in a local area is calculated to obtain the complaint concentration factor of the local area, and the concentration trend is reflected by the mean. In other embodiments of the present invention, the mode or median of all complaint data in a local area is used as the complaint concentration factor of the local area, and the concentration trend is reflected by the mode or median.

[0067] Step S203: obtaining adjustment parameters of the target area in terms of complaint type according to the difference between the target area and all local areas in the complaint concentration factor and the complaint concentration factor of the target area;

[0068] In one embodiment of the present invention, in the same complaint type, the absolute value of the difference between the complaint concentration factor of the target area and the complaint concentration factors of each local area is calculated to obtain the local deviation factor of the local area; the difference is reflected by the absolute value of the difference, and the larger the local deviation factor, the greater the difference in complaint data in the complaint type between the local area and the target area.

[0069] Calculate the mean of the local deviation factors of all local areas to obtain the complaint deviation parameter of the target area; the larger the complaint deviation parameter, the greater the difference in complaint data between all local areas and the target area;

[0070] According to the complaint deviation parameter of the target area and the complaint concentration factor of the target area, the adjustment parameter of the target area is obtained; the complaint deviation parameter and the adjustment parameter are positively correlated; the complaint concentration factor and the adjustment parameter of the target area are negatively correlated.

[0071] In one embodiment of the present invention, the ratio of the complaint deviation parameter and the complaint concentration factor of the target area is calculated, and the ratio is normalized, and the sum of 1 and the normalized result is calculated to obtain the adjustment parameter of the target area. The specific formula includes:

[0072] Among them, TZ is the adjustment parameter of the target area in the complaint type; PC is the complaint deviation parameter of the target area in the complaint type; SJ is the complaint concentration factor of the target area in the complaint type; norm() is the normalization function.

[0073] In the formula, the complaint data reflects the customer's dissatisfaction with the power equipment. The power equipment in different local areas has different sensitivities to influencing factors, resulting in different degrees of influence of influencing factors in different areas on the same complaint type. For example, the weather severity score in some local areas is very large, that is, the weather is bad, and the power equipment is not very sensitive to the weather, that is, bad weather is unlikely to cause power equipment failures, resulting in a low number of complaints or no complaints corresponding to the complaint type of frequent power outages. It may be different from the frequency change performance of other local areas, resulting in the above calculated correlation factor not accurately representing the degree of influence of influencing factors on the complaint type. The larger the complaint deviation parameter, the greater the difference in complaint data between the target area and all local areas, and the less sensitive the target area is to external factors. At this time, the correlation factor needs to be increased, and the larger the adjustment parameter; the smaller the complaint concentration factor, the lower the complaint frequency of the representative area, and the stable operation of the power equipment in the representative area is, and the sensitivity to influencing factors is low. At this time, the correlation factor needs to be increased, and the larger the adjustment parameter; It reflects that adjustments are made based on the sensitivity of the local area while retaining the original relevant factors. The larger the adjustment parameter, the lower the sensitivity of the power equipment to the influencing factors.

[0074] Step S204: according to the adjustment parameters, the correlation factors of the influencing factors and complaint types in the target area are adjusted to obtain the correlation indicators of the influencing factors and complaint types in the target area; the adjustment parameters and the correlation factors are positively correlated with the correlation indicators.

[0075] By adjusting the parameters, the relevant indicators can more accurately reflect the impact of influencing factors on complaint types in local areas. The larger the value, the greater the impact.

[0076] In one embodiment of the present invention, the product of the adjustment parameter and the relevant factor is calculated and the product is normalized to obtain the relevant index of the influencing factors and the complaint type in the target area. In one embodiment of the present invention, norm() can be used for normalization so that the value is normalized to between 0 and 1, and norm() is a normalization function.

[0077] Step S3, in the same complaint type in the target area, based on the complaint data at all historical moments and the impact data of all types of influencing factors at all historical moments, obtain the data set of all parent nodes of each decision tree and the initial depth of each decision tree; in the decision tree, based on the numerical distribution of all complaint data in the data set of the parent node, the relevant indicators of each influencing factor and complaint type, and the performance of the decision tree, adjust the initial depth of the decision tree to obtain the adjusted depth of the decision tree.

[0078] In order to predict the complaint data of all complaint types in the local area, the random forest algorithm is first used to construct a decision tree and obtain the initial depth of the decision tree. Considering that the initial depth of the decision tree ignores the correlation between the influencing factors on the complaint types and ignores the necessity of some parent nodes in the data segmentation process, and since the depth of the decision tree affects the prediction results, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree. The adjusted depth is more reasonable and improves the reliability of the prediction model.

[0079] Specifically, when predicting the complaint data of the complaint type in the target area by using the random forest algorithm, a decision tree is first constructed, and the various decision trees of the complaint type in the target area are obtained based on the complaint data at all historical moments and the influence data of all kinds of influencing factors at all historical moments, and then the data set of all parent nodes of each decision tree and the initial depth of each decision tree are obtained; it should be noted that the random forest algorithm for constructing decision trees is a prior art well known to those skilled in the art, and is only briefly described here: the decision tree in the random forest is a tree structure consisting of a root node, a parent node, a child node, and a leaf node. The data set containing the complaint data corresponding to the parent node is divided into subsets according to the value of the influencing factor and passed to the child node; the child node continues to be divided according to the value of other influencing factors until it reaches the leaf node. In the random forest, each decision tree is constructed independently, so their parent node and child node structures may be different. Among them, the root node is the topmost node of the decision tree, which usually contains samples of the entire data set; the leaf node is the bottommost node of the decision tree, which has no child nodes and represents the final classification result; the parent node is also called the internal node, which is used to divide the data set into subsets according to the value of a certain feature attribute; the child node is split from the parent node according to a certain rule, and each child node represents a more specific classification or a smaller data set.

[0080] In order to analyze the necessity of the parent node in the data segmentation process, the simplifiable index of the parent node is obtained according to the numerical distribution of all complaint data in the data set of the parent node and the relevant indicators of each influencing factor and complaint type; the larger the value of the simplifiable index is, the greater the degree to which the parent node can be simplified, and the less necessary the parent node is for segmentation.

[0081] See also Figure 3 , which shows a flow chart of a method for obtaining a simplifiable indicator provided by an embodiment of the present invention. Preferably, in an embodiment of the present invention, the method for obtaining a simplifiable indicator includes:

[0082] Step S301: Obtain the distribution concentration factor of the parent node according to the distribution concentration of all complaint data in the data set of the parent node;

[0083] In one embodiment of the present invention, in the data set of the parent node, all complaint data are sorted in order from small to large to obtain the complaint data sequence of the parent node; the mean of the differential values ​​of all complaint data points in the complaint data sequence is calculated to obtain the overall dispersion parameter; the overall dispersion parameter is negatively correlated to obtain the distribution concentration factor of the parent node, and the distribution concentration is reflected by calculating the mean of the differential values ​​of all complaint data and performing negative correlation mapping. It should be noted that in one embodiment of the present invention, exp(-x) is used to perform negative correlation mapping on x, and exp() is an exponential function with e as the base. During the sorting process, there may be complaint data of the same size. In this case, the complaint data is sorted in the order of the historical moments corresponding to the complaint data from first to last.

[0084] In other embodiments of the present invention, the variance of all complaint data in the data set of the parent node can also be calculated, and the variance can be negatively correlated to obtain the distribution concentration factor of the parent node. The distribution concentration situation can be reflected by negatively correlating the variance.

[0085] Step S302: Obtain the distribution dispersion factor of the parent node according to the distribution difference of all complaint data in the data set of the parent node;

[0086] In one embodiment of the present invention, in the data set of the parent node, the absolute value of the difference between every two complaint data is obtained, and the maximum absolute value of the difference is used as the distribution dispersion factor of the parent node; the maximum absolute value of the difference reflects the distribution difference. In other embodiments of the present invention, the variance of all complaint data in the data set of the parent node can also be calculated to obtain the distribution dispersion factor of the parent node.

[0087] Step S303: Obtain the simplifiable index of the parent node according to the relevant indexes, distribution concentration factor and distribution dispersion factor of the influencing factors and complaint types corresponding to the parent node; the relevant indexes and distribution dispersion factors are negatively correlated with the simplifiable index; the distribution concentration factor is positively correlated with the simplifiable index.

[0088] In one embodiment of the present invention, negative correlation mapping is performed on the relevant index and the distribution dispersion factor respectively, the product of the two negative correlation mapping results is calculated, and the distribution concentration factor and the product are multiplied to obtain the simplifiable index of the parent node; the specific formula includes:

[0089] Among them, YS is the simplifiable index of the parent node; XG is the relevant index of the influencing factors and complaint types corresponding to the parent node; JZ is the distribution concentration factor of the parent node; FS is the distribution dispersion factor of the parent node; ε1 is the first adjustment factor of the denominator; ε2 is the second adjustment factor of the denominator. In one embodiment of the present invention, the first adjustment factor of the denominator is 0.001, and the second adjustment factor of the denominator is 0.0001, so as to prevent the denominator from being 0, which is not limited here.

[0090] In the formula, since the parent node divides the data according to the influencing factors in the process of decision tree division, and since different influencing factors have different degrees of influence on the complaint type and different necessity of influencing factors in the division process, considering that the larger the distribution concentration factor of the parent node is, the more concentrated the distribution of the internal set of the parent node is, the data is relatively pure, so further division may not produce much effect, the more it can be simplified, and the larger the simplification index is; considering that the larger the distribution dispersion factor of the parent node is, the more dispersed the distribution of the internal set of the parent node is, the less it can be simplified, and the smaller the simplification index is; considering that the larger the relevant index of the influencing factors and complaint types corresponding to the node is, the more important the influencing factors are in the division process, the less it can be simplified, and the smaller the simplification index is; obtain the simplifiable index, the smaller the simplifiable index is, the more important the parent node is in the data segmentation process, and the less it can be simplified.

[0091] In order to adjust the initial depth of the decision tree, it is necessary to analyze the performance of the decision tree corresponding to the initial depth and the simplification degree of the parent node, adjust the initial depth of the decision tree, and obtain the adjusted depth of the decision tree. The adjusted depth is more reasonable and the reliability of the prediction model is improved.

[0092] See also Figure 4 , which shows a flow chart of a method for obtaining an adjusted depth provided by an embodiment of the present invention. Preferably, in an embodiment of the present invention, the method for obtaining the adjusted depth includes:

[0093] Step S311: obtaining an evaluation function of a decision tree and a hierarchy of the decision tree; obtaining a performance factor of the decision tree according to the evaluation function of the decision tree and the hierarchy of the decision tree; the evaluation function and the performance factor are negatively correlated, and the hierarchy and the performance factor are negatively correlated;

[0094] It should be noted that obtaining the evaluation function of the decision tree and the level of the decision tree are prior arts well known to those skilled in the art and will not be described in detail here. The smaller the evaluation function of the decision tree and the fewer the levels of the decision tree, the better the performance of the decision tree and the larger the performance factor. At this time, the more appropriate the initial depth of the decision tree is, and the less adjustment should be made to the initial depth.

[0095] In one embodiment of the present invention, the product of the evaluation function of the decision tree and the level of the decision tree is calculated, and the product is negatively correlated to obtain the performance factor of the decision tree. For example, in one embodiment of the present invention, norm(-x) is used to negatively correlate x.

[0096] Step S312: integrating the simplifiable indicators of all parent nodes in the decision tree to obtain the overall simplifiable parameters of the decision tree;

[0097] The overall simplification parameter reflects the overall simplification degree of the decision tree. The larger the value, the more the decision tree can be simplified and the initial depth can be reduced.

[0098] In one embodiment of the present invention, the cumulative value of the reducible index of all parent nodes in the decision tree is calculated and normalized to obtain the overall reducible parameter of the decision tree, and the overall trend is reflected by the cumulative value. In one embodiment of the present invention, the mean of the reducible index of all parent nodes in the decision tree is calculated and normalized to obtain the overall reducible parameter of the decision tree. For example, in one embodiment of the present invention, linear normalization is used for normalization to between 0 and 1.

[0099] Step S313: According to the overall simplifiable parameters and performance factors of the decision tree, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree; the initial depth and performance factors are positively correlated with the adjusted depth, and the overall simplifiable parameters are negatively correlated with the adjusted depth.

[0100] Calculate the ratio of the performance factor and the overall simplifiable parameter, and normalize the ratio to obtain a normalized result; calculate the product of the normalized result and the initial depth to obtain the adjusted depth of the decision tree; in one embodiment of the present invention, the adjusted depth formula includes:

[0101] Eout is the adjusted depth of the decision tree; Ein is the initial depth of the decision tree; XG is the performance factor of the decision tree; ZYS is the overall simplifiable parameter of the decision tree; norm() is the normalization function.

[0102] In the formula, the overall simplification parameter reflects the overall simplification degree of the decision tree. The larger the value, the more the decision tree can be simplified and the smaller the initial depth can be adjusted. The larger the performance factor, the more appropriate the initial depth of the decision tree is, and the smaller the adjustment degree of the initial depth should be. This makes the adjusted depth more reasonable and improves the reliability of the prediction model.

[0103] Step S4, obtaining predicted complaint data of each complaint type in each local area according to the adjusted depth of each decision tree corresponding to the same complaint type in the target area.

[0104] The random forest method is used to predict the complaint data according to the adjusted depth of each decision tree corresponding to the same complaint type in the target area, and the predicted complaint data of each complaint type in each local area is obtained. It should be noted that the random forest method is a technical means well known to those skilled in the art and will not be described in detail here.

[0105] Furthermore, in the local area, the cumulative value of the predicted complaint data of all complaint types in the local area is calculated, and the ratio of the predicted complaint data of the complaint type in the local area to the cumulative value is calculated to obtain the complaint risk probability of the complaint type in the local area; the possible causes of the complaint types are analyzed, and advance investigation, inspection and maintenance are carried out in advance to achieve "foreknowledge" of complaints, enhance the company's early warning capabilities for complaint work orders, and based on this, carry out more targeted service improvements, reduce service risks, and achieve a reduction in the number of company complaint work orders.

[0106] In summary, the embodiment of the present invention provides a customer complaint risk prediction method based on the random forest algorithm, first obtaining the relevant indicators of the influencing factors and complaint types in the target area; adjusting the initial depth of the decision tree according to the numerical distribution of all complaint data in the data set of the parent node and the relevant indicators of each influencing factor and complaint type and the performance of the decision tree, and obtaining the adjusted depth of the decision tree; obtaining the predicted complaint data of each complaint type in each local area according to the adjusted depth of each decision tree corresponding to the same complaint type in the target area. In the embodiment of the present invention, by combining the differences in the correlation between the complaint types due to the influencing factors and the necessity of the parent node in the data segmentation process, the adjusted depth is made more reasonable and the reliability of the prediction is improved.

[0107] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0108] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A customer complaint risk prediction method based on random forest algorithm, characterized in that: The method comprises the following steps: Obtain complaint time series data of all complaint types in different local areas, and influence time series data of all influencing factors; the complaint time series data includes complaint data at all historical moments; the influence time series data includes influence data at all historical moments; Any local area is taken as a target area; in the target area, according to the correlation between the complaint time series data and the impact time series data, and the difference between the complaint data corresponding to the target area and all local areas, the relevant indicators of the influencing factors and complaint types in the target area are obtained; In the same complaint type in the target area, based on the complaint data at all historical moments and the impact data of all influencing factors at all historical moments, the data set of all parent nodes of each decision tree and the initial depth of each decision tree are obtained; in the decision tree, based on the numerical distribution of all the complaint data in the data set of the parent node, the relevant indicators of each influencing factor and complaint type, and the performance of the decision tree, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree; According to the adjusted depth of each decision tree corresponding to the same complaint type in the target area, the predicted complaint data of each complaint type in each local area is obtained.

2. According to claim 1, a customer complaint risk prediction method based on random forest algorithm is characterized in that: The method for obtaining the relevant indicators specifically includes: According to the correlation between the complaint time series data and the impact time series data, obtaining the correlation factors of the impact factors and the complaint types in the target area; In the same complaint type, according to the concentration trend of the complaint data in each local area, the complaint concentration factor of each local area is obtained; According to the difference between the target area and all the local areas in the complaint concentration factor and the complaint concentration factor of the target area, obtaining an adjustment parameter of the target area in the complaint type; According to the adjustment parameters, the correlation factors of the influencing factors and complaint types in the target area are adjusted to obtain the correlation indicators of the influencing factors and complaint types in the target area; the adjustment parameters and the correlation factors are positively correlated with the correlation indicators.

3. According to claim 2, a customer complaint risk prediction method based on random forest algorithm is characterized in that: The method for obtaining the correlation factor includes: The absolute value of the Pearson correlation coefficient between the complaint time series data and the impact time series data is calculated to obtain the correlation factor between the impact factor and the complaint type in the target area.

4. According to claim 2, a customer complaint risk prediction method based on random forest algorithm is characterized in that: The method for obtaining the adjustment parameter includes: In the same complaint type, the absolute value of the difference between the complaint concentration factor of the target area and the complaint concentration factor of each local area is calculated to obtain the local deviation factor of each local area; Calculate the mean of the local deviation factors of all the local areas to obtain the complaint deviation parameter of the target area; According to the complaint deviation parameter of the target area and the complaint concentration factor of the target area, the adjustment parameter of the target area in the complaint type is obtained; the complaint deviation parameter and the adjustment parameter are positively correlated; the complaint concentration factor of the target area and the adjustment parameter are negatively correlated.

5. The method for predicting customer complaint risk based on random forest algorithm according to claim 1, characterized in that: The method for obtaining the adjusted depth includes: Obtaining a simplifiable index of the parent node according to the numerical distribution of all the complaint data in the data set of the parent node and the relevant index of each influencing factor and complaint type; According to the simplifiable index of the parent node and the performance of the decision tree, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree.

6. The method for predicting customer complaint risk based on random forest algorithm according to claim 5, characterized in that: The method for obtaining the simplified indicator includes: Obtaining a distribution concentration factor of the parent node according to the distribution concentration of all the complaint data in the data set of the parent node; Obtaining a distribution dispersion factor of the parent node according to the distribution differences of all the complaint data in the data set of the parent node; According to the relevant indicators, distribution concentration factor and distribution dispersion factor of the influencing factors and complaint types corresponding to the parent node, the simplifiable indicators of the parent node are obtained; the relevant indicators and the distribution dispersion factor are negatively correlated with the simplifiable indicators; the distribution concentration factor is positively correlated with the simplifiable indicators.

7. The method for predicting customer complaint risk based on random forest algorithm according to claim 6, characterized in that: The method for obtaining the distribution concentration factor includes: In the data set of the parent node, all the complaint data are sorted in order from small to large to obtain the complaint data sequence of the parent node; the mean of the differential values ​​of all complaint data points in the complaint data sequence is calculated to obtain the overall dispersion parameter; the overall dispersion parameter is negatively correlated and mapped to obtain the distribution concentration factor of the parent node.

8. The method for predicting customer complaint risk based on random forest algorithm according to claim 6 is characterized in that: The method for obtaining the distribution dispersion factor includes: In the data set of the parent node, the absolute value of the difference between every two complaint data is obtained, and the maximum absolute value of the difference is used as the distribution dispersion factor of the parent node.

9. The method for predicting customer complaint risk based on random forest algorithm according to claim 6, characterized in that: The method for obtaining the adjusted depth includes: Obtaining an evaluation function of a decision tree and a level of the decision tree; obtaining a performance factor of the decision tree according to the evaluation function of the decision tree and the level of the decision tree; the evaluation function and the performance factor are negatively correlated, and the level and the performance factor are negatively correlated; The simplifiable indicators of all parent nodes in the decision tree are integrated to obtain the overall simplifiable parameters of the decision tree; According to the overall simplifiable parameter and the performance factor of the decision tree, the initial depth of the decision tree is adjusted to obtain the adjusted depth of the decision tree; the initial depth and the performance factor are positively correlated with the adjusted depth, and the overall simplifiable parameter is negatively correlated with the adjusted depth.

10. The method for predicting customer complaint risk based on random forest algorithm according to claim 9, characterized in that: The overall simplified parameter acquisition method includes: The cumulative values ​​of the reducible indicators of all parent nodes in the decision tree are calculated and normalized to obtain the overall reducible parameters of the decision tree.

Citation Information

Patent Citations

  • Random forest-based power failure sensitive user prediction method and system, storage medium and computer equipment

    CN112766550A

  • Customer complaint risk prediction method and device, equipment and medium

    CN114298425A

  • Cooling system intelligent control method and system based on fluorinated liquid performance degradation evaluation

    CN117479510A

  • Automatic tip stopper forming apparatus for sutures

    KR1020230012160A