A feature selection method and related apparatus
By employing a causal feature selection method in the 5G core network, multiple regression models and causal relationship graphs are established, solving the problem of weak robustness of prediction models in traditional methods, and achieving more stable feature selection and better model adaptability.
Patent Information
- Application Number
- CN202210609891.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-05-31
AI Technical Summary
In 5G core networks, traditional feature selection methods select variables based on correlations, resulting in weak robustness of prediction models in different scenarios and hindering the promotion of models across different 5G core network sites.
A feature selection method based on causal relationships is adopted. By establishing first and second regression models with N variables, a candidate set of features is determined. Then, by combining causal relationship diagrams and contribution analysis, a stable set of features is selected.
It improves the robustness and interpretability of the prediction model, enabling the model to better adapt to different scenarios, reducing computation time consumption, and providing better decision support.
Smart Images

Figure CN115099465B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a feature selection method and related apparatus. Background Technology
[0002] To ensure the agility and efficiency of 5G networks, operators are gradually shifting their network deployment model from platform-based to cloud-based, a trend particularly evident in the construction of 5G core networks. In cloud-based core networks, network element services are primarily handled by their corresponding virtual machines. Predicting virtual machine resource utilization in advance can assist operations engineers in determining network element service migration strategies.
[0003] However, in the core network, there are thousands of parameters. Directly applying all parameters to build a prediction model for virtual machine resource utilization would not only consume a large amount of computing resources, but also make the prediction model prone to overfitting, resulting in a decline in model generalization performance. Therefore, it is necessary to select features (i.e., parameters) before building the prediction model.
[0004] Traditional feature selection methods often rely on the correlation between the target variable and other variables to select variables for building a predictive model. Here, the target variable is the variable that needs to be predicted, and the other variables are the variables used for prediction. In the example above, the target variable is the parameter representing virtual machine resource utilization, and the other variables are parameters other than the parameter representing virtual machine resource utilization.
[0005] However, the correlation is likely to change with the change of scenario, which will lead to the poor robustness of the prediction model built based on the selected variables, and hinder the promotion of the prediction model among different 5G core network sites. Summary of the Invention
[0006] This application provides a feature selection method and related apparatus for selecting appropriate variables to improve the robustness of the prediction model built based on the selected variables.
[0007] Firstly, this application provides a feature selection method, including: establishing a first regression model with N variables, the N variables including a first target variable and a second target variable, the first target variable and the second target variable being two different target variables, the first target variable and the second target variable having a deterministic relationship, which can be understood as: if the value of the first target variable is determined, the value of the second target variable can be determined; or, if the value of the second target variable is determined, the value of the first target variable can be determined. The dependent variable of the first regression model is the first target variable. The independent variables of the first regression model include all variables other than the first target variable from among N variables, where N is a positive integer greater than 2. Regression model is a predictive modeling technique that studies the relationship between the dependent variable and the independent variables. A first feature candidate set is determined based on the first regression model. The first feature candidate set includes at least one variable other than the first target variable from among multiple variables. If the first feature candidate set includes the second target variable, a second regression model is established. The dependent variable of the second regression model is the first target variable. The independent variables of the second regression model include all variables other than the first target variable and the second target variable from among N variables. A second feature candidate set is determined based on the second regression model. The second feature candidate set includes at least one variable other than the first target variable and the second target variable from among N variables. The feature set of the first target variable is determined based on the causal relationship between the first target variable and the variables in the second feature candidate set, as well as the second feature candidate set.
[0008] The feature set is determined based on the causal relationship between the target variable and other variables. Since causal relationships are generally more stable than correlational relationships, a better feature set can be obtained. This allows the variables in the selected feature set to better predict the target variable, and the prediction model built based on the feature set has better robustness to different scenarios, enabling more effective scaling to a wider range of scenarios. Furthermore, in terms of interpretability, the feature selection method provided in this application can discover the local causal relationship structure of the target variable, thus providing operations engineers with more interpretable information to assist in decision-making.
[0009] Furthermore, if the first candidate feature set contains a second target variable that has a deterministic relationship with the first target variable, the second target variable will affect the fitting of other variables to the first target variable, causing some variables to be missed in the determined first candidate feature set. Based on this, the embodiments of this application adopt a two-stage algorithm to obtain the feature set. That is, firstly, the first candidate feature set is determined by the first regression model. If the first candidate feature set contains a second target variable that has a deterministic relationship with the first target variable, then the second candidate feature set is determined by the second regression model. Then, the feature set is determined by the second candidate feature set, thereby avoiding the omission of variables in the feature set. Moreover, it can also effectively reduce the selection range of the feature set and significantly reduce the computation time consumption.
[0010] As an achievable method, determining the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the second feature candidate set, and the second feature candidate set includes: obtaining a third feature candidate set based on the first feature candidate set and the second feature candidate set, wherein the third feature candidate set is obtained by removing the second target variable from the union of the first feature candidate set and the second feature candidate set; and determining the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the third feature candidate set, and the third feature candidate set.
[0011] Since the first feature candidate set may contain variables that are not present in the second feature candidate set, the first and second feature candidate sets are combined to obtain the third feature candidate set, and the feature set is determined based on the third feature candidate set, thus obtaining a more complete and comprehensive feature set.
[0012] As an achievable approach, determining the first feature candidate set based on the first regression model includes: calculating the first contribution of each variable in the first regression model and the first saddle point, where a saddle point is a critical point that is neither a maximum nor a minimum; and selecting variables in the first regression model whose first contribution is greater than the first saddle point to form the first feature candidate set.
[0013] This implementation provides one approach to determining the first set of feature candidates.
[0014] As one feasible approach, determining the second feature candidate set based on the second regression model includes: calculating the second contribution of each variable in the second regression model and the second saddle point; selecting variables in the second regression model whose second contribution is greater than the second saddle point to form the second feature candidate set.
[0015] This implementation provides one approach to determining the candidate set of second features.
[0016] As one possible approach, the method further includes: when the first feature candidate set does not include the second target variable, determining the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the first feature candidate set, and the first feature candidate set.
[0017] As an feasible approach, establishing a first regression model for N variables involves: obtaining multiple samples that conform to independent and identically distributed distributions based on the original time series data of the N variables, with each sample containing one value of the N variables; and establishing a first regression model based on the multiple samples.
[0018] As an achievable method, obtaining multiple samples conforming to the independent and identically distributed distribution based on the original time series data of N variables includes: removing outliers from the original time series data of N variables, where outliers, also known as extrapolated data, refer to one or more values in the data that differ significantly from other values; and obtaining multiple samples conforming to the independent and identically distributed distribution based on the original time series data of N variables after removing outliers.
[0019] By using the original time series data of N variables after removing outliers, multiple samples that conform to independent and identical distributions can be obtained, which can improve the accuracy of the samples.
[0020] Secondly, this application provides a feature selection apparatus, comprising: a model building unit for building a first regression model of N variables, the N variables including a first target variable and a second target variable, the first target variable and the second target variable having a deterministic relationship, the dependent variable of the first regression model being the first target variable, and the independent variables of the first regression model including other variables among the N variables besides the first target variable, where N is a positive integer greater than 2; a determination unit for determining a first feature candidate set based on the first regression model, the first feature candidate set including at least one variable among multiple variables besides the first target variable; a model building unit for building a second regression model when the first feature candidate set includes the second target variable, the dependent variable of the second regression model being the first target variable, and the independent variables of the second regression model including other variables among the N variables besides the first target variable and the second target variable; a determination unit for determining a second feature candidate set based on the second regression model, the second feature candidate set including at least one variable among the N variables besides the first target variable and the second target variable; and a determination unit for determining a feature set of the first target variable based on the causal relationship between the first target variable and the variables in the first feature candidate set, and the second feature candidate set.
[0021] As one possible approach, a determining unit is used to obtain a third feature candidate set based on a first feature candidate set and a second feature candidate set, wherein the third feature candidate set is obtained by removing the second target variable from the union of the first feature candidate set and the second feature candidate set; and to determine the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the third feature candidate set, as well as the third feature candidate set.
[0022] As an feasible approach, a unit is determined to calculate the first contribution and first saddle point of each variable in the independent variables of the first regression model; variables with a first contribution greater than the first saddle point in the independent variables of the first regression model are selected to form the first feature candidate set.
[0023] As one feasible approach, a unit is determined to calculate the second contribution of each variable in the second regression model and the second saddle point in the second regression model; variables in the second regression model whose second contribution is greater than the second saddle point are selected to form the second feature candidate set.
[0024] As one possible approach, the determining unit is also used to determine the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the first feature candidate set, and the first feature candidate set, when the first feature candidate set does not include the second target variable.
[0025] As an achievable approach, the model building unit is used to obtain multiple samples that conform to independent and identically distributed distributions based on the original time series data of N variables, with each sample containing one value of the N variables; and to build a first regression model based on the multiple samples.
[0026] As an achievable approach, a model building unit is used to remove outliers from the original time series data of N variables; based on the original time series data of the N variables after removing outliers, multiple samples conforming to independent and identically distributed distributions are obtained.
[0027] For details on the implementation, related explanations, and technical effects of each of the above units, please refer to the relevant descriptions in the first section.
[0028] A third aspect of this application provides a computer device, including: one or more processors and a memory; wherein the memory stores computer-readable instructions; and one or more processors read the computer-readable instructions to cause the computer device to implement the method as described in any implementation of the first aspect.
[0029] A fourth aspect of this application provides a computer-readable storage medium including computer-readable instructions that, when executed on a computer, cause the computer to perform a method as described in any implementation of the first aspect.
[0030] A fifth aspect of this application provides a chip including one or more processors. Part or all of the processors are configured to read and execute a computer program stored in a memory to perform the methods in any possible implementation of the first aspect described above.
[0031] Optionally, the chip includes a memory, which is connected to the processor via a circuit or wire. Further optionally, the chip also includes a communication interface, to which the processor is connected. The communication interface is used to receive data and / or information that needs to be processed. The processor obtains the data and / or information from the communication interface, processes the data and / or information, and outputs the processing result through the communication interface. The communication interface can be an input / output interface.
[0032] In some implementations, some of the processors in one or more processors may implement some of the steps in the above methods through dedicated hardware. For example, the processing involving neural network models may be implemented by a dedicated neural network processor or graphics processor.
[0033] The method provided in this application embodiment can be implemented by a single chip or by multiple chips working together.
[0034] A sixth aspect of this application provides a computer program product, which includes computer software instructions that can be loaded by a processor to implement any of the methods described in the first aspect above. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the core network structure;
[0036] Figure 2 A schematic diagram of an embodiment of the feature selection method provided in this application;
[0037] Figure 3 This is a schematic diagram of an embodiment for establishing the first regression model in this application.
[0038] Figure 4 A schematic diagram illustrating an application example provided in this application;
[0039] Figure 5 This is a flowchart illustrating the process of determining the feature set in the embodiments of this application;
[0040] Figure 6 This is a schematic diagram of the structure of the feature selection device provided in the embodiments of this application;
[0041] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0043] The terms "first," "second," and corresponding designations in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0044] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Furthermore, in the description of this application, "at least one" refers to one or more items, and "multiple" refers to two or more items. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0045] Figure 1 This is a schematic diagram of the core network structure. (Example) Figure 1 As shown, the core network deploys Access and Mobility Management Function (AMF) network elements, Session Management Function (SMF) network elements, and Unified Data Management (UDM) network elements. In addition, the core network also deploys various other network elements.
[0046] The AMF (Access Management Function) element has access and mobility management functions, performing registration, connection, reachability, and mobility management. It provides a session management message transmission channel for user equipment and the SMF element, and provides authentication and authorization functions for user access. It serves as the core network control plane access point for terminals and the wireless network. The SMF element is responsible for tunnel maintenance, Internet Protocol (IP) address allocation and management, policy enforcement and QoS control, billing data collection, roaming, etc. The UDM (User Management Function) element is responsible for authentication, user identification, access authorization, registration, mobility, subscription, and SMS management.
[0047] The functionality of AMF, SMF, and UDM network elements relies on multiple virtual machines (VMs). To achieve intelligent disaster recovery for these network elements, when one element fails, its associated services need to be promptly migrated to other elements. As new services migrate, the workload on other network elements inevitably increases, leading to a rise in the resource utilization of the VMs handling those services. This resource utilization can be represented by CPU utilization and memory utilization. To ensure the VMs function properly, their resource utilization needs to be controlled; for example, the CPU and memory utilization should be kept below set thresholds. Therefore, when developing intelligent disaster recovery strategies for network elements, it is necessary to predict the VM resource utilization (e.g., CPU and memory utilization) in advance based on the workload. This prediction can be achieved using a predictive model.
[0048] Therefore, a predictive model needs to be built before making predictions. To ensure that the constructed predictive model has good generalization performance, feature selection is required before building the predictive model. Feature selection refers to choosing appropriate variables for the target variable, and then using the target variable as the dependent variable and the selected variables as independent variables to build the predictive model.
[0049] In the embodiments of this application, the target variable can be understood as the variable to be predicted, and the selected variable can be understood as a reference variable used to predict the target variable.
[0050] For example, in Figure 1 In the core network shown, parameters may include service volume parameters such as the number of real-time users registered in the AMF state for each network element and the number of times the network has successfully reselected from the 4G network to the 5G network, as well as parameters such as the CPU utilization, memory utilization, hard disk read rate, and hard disk write rate for each virtual machine.
[0051] Taking the prediction of virtual machine resource utilization as an example, the target variables can be CPU utilization and memory utilization among the parameters mentioned above. For the target variable of CPU utilization, at least one of the parameters other than CPU utilization can be selected to build a prediction model. For the target variable of memory utilization, at least one of the parameters other than memory utilization can be used as a feature variable to build a prediction model.
[0052] Traditional feature selection methods often rely on the correlation between the target variable and other variables to select variables for building the predictive model. However, these correlations are likely to change with different scenarios, leading to weak robustness in the resulting predictive model and hindering its deployment across different 5G core network sites.
[0053] To address this, this application provides a feature selection method based on the causal relationship between the target variable and other variables. Compared to correlation, causal relationships are generally more stable, allowing the selected variables to better predict the target variable. Furthermore, the model built based on causal feature selection exhibits better robustness across different scenarios and can be more effectively scaled to more 5G core site locations. In terms of interpretability, the feature selection method provided in this application can discover the local causal relationship structure of the target variable, thus providing operations engineers with more interpretable information to assist in decision-making.
[0054] In summary, the feature selection method provided in this application can enhance the robustness and interpretability of the prediction model.
[0055] In addition, the feature selection method provided in this application is applicable to scenarios with multiple target variables, and can select the variables used to build a prediction model in scenarios with multiple target variables.
[0056] It should be noted that the application scenarios of the feature selection method provided in this application embodiment are not limited to the above-mentioned virtual machine resource utilization prediction scenario, but can also be applied to any other feature selection scenario; when the feature selection method provided in this application embodiment is applied to the above-mentioned virtual machine resource utilization prediction scenario, the feature selection method provided in this application embodiment can specifically be applied to a certain server or server cluster.
[0057] The feature selection method provided in the embodiments of this application is described below.
[0058] like Figure 2 As shown, this application provides an embodiment of a feature selection method, which includes:
[0059] Step 101: Establish a first regression model with N variables, including the first target variable and the second target variable. The first target variable and the second target variable have a deterministic relationship. The dependent variable of the first regression model is the first target variable. The independent variables of the first regression model include the other variables among the N variables except the first target variable. N is a positive integer greater than 2.
[0060] The first target variable and the second target variable refer to two different target variables.
[0061] The value of N can be 3, 4 or more; in addition to the first target variable and the second target variable, the N variables can also include other target variables or feature variables. The feature variables can be understood as attribute variables, which can be any one of the N variables other than the target variable.
[0062] For example, with Figure 1 Taking the scenario shown as an example, the N variables include: the number of real-time users registered in the AMF, the number of successful reselections from the 4G network to the 5G network, the CPU utilization of the virtual machine, the memory utilization, the hard disk read rate, and the hard disk write rate. Among them, the first target variable and the second target variable can be the CPU utilization and the memory utilization, respectively. In addition to these two target variables, the hard disk read rate is also a target variable. The number of real-time users registered in the AMF, the number of successful reselections from the 4G network to the 5G network, the CPU utilization of the virtual machine, and the hard disk write rate are feature variables.
[0063] The deterministic relationship between the first and second objective variables can be understood as follows: if the value of the first objective variable is determined, the value of the second objective variable can be determined; or, if the value of the second objective variable is determined, the value of the first objective variable can be determined. For example, when the first and second objective variables are memory utilization and memory remaining rate, respectively, since the sum of memory utilization and memory remaining rate is 1, determining one value allows us to determine the other. In this case, the first and second objective variables have a deterministic relationship.
[0064] Regression models are a predictive modeling technique that studies the relationship between dependent and independent variables.
[0065] The process of establishing the first regression model will be explained below.
[0066] As a feasible approach, such as Figure 3 As shown, step 101 includes:
[0067] Step 201: Based on the original time series data of N variables, obtain multiple samples that conform to independent and identically distributed distributions, with each sample containing one value of the N variables.
[0068] Time series data is data collected at different times to describe how a phenomenon changes over time.
[0069] The original time series data of N variables can be understood as data of N variables collected at different times.
[0070] Specifically, the original time series data can be segmented by time to obtain multiple segments of original time series data. Each segment contains data for N variables at multiple times. Then, for each segment, the average value of each variable is calculated. In this way, each segment of original time series data will correspond to the average value of N variables, i.e., a sample. Ultimately, multiple samples can be obtained.
[0071] After obtaining multiple samples, these samples are further processed to ensure that they conform to independent and identically distributed distributions.
[0072] It should be noted that the original time series data may contain outliers. Therefore, as an implementation method, step 201 includes: removing outliers from the original time series data of N variables; and obtaining multiple samples that conform to independent and identically distributed distributions based on the original time series data of N variables after removing outliers.
[0073] Outlier data refers to data in which one or more values significantly exceed the normal range compared to other values.
[0074] By using the original time series data of N variables after removing outliers, multiple samples that conform to independent and identical distributions can be obtained, which can improve the accuracy of the samples.
[0075] Step 202: Establish the first regression model based on multiple samples.
[0076] Step 102: Determine the first feature candidate set based on the first regression model. The first feature candidate set includes at least one variable other than the first target variable among multiple variables.
[0077] There are various methods for determining the first feature candidate set, and this application does not specifically limit them in the embodiments.
[0078] As one possible approach, step 102 includes: calculating the first contribution of each variable in the independent variables of the first regression model and the first saddle point in the first regression model; selecting variables in the independent variables of the first regression model whose first contribution is greater than the first saddle point to form a first feature candidate set.
[0079] A saddle point is a critical point that is neither a maximum nor a minimum.
[0080] It should be noted that the methods for calculating the first contribution and the first saddle point are relatively mature technologies, and the embodiments of this application are not specifically limited here.
[0081] Step 103: If the first feature candidate set includes the second target variable, establish a second regression model. The dependent variable of the second regression model is the first target variable, and the independent variables of the second regression model include the other variables among the N variables besides the first and second target variables.
[0082] It should be noted that, since there is a deterministic relationship between the first and second target variables, if the first feature candidate set includes the second target variable, it will break the causal fidelity assumption and affect the fit between the first target variable and other variables, resulting in the omission of some variables in the first feature candidate set, thus affecting the comprehensiveness and completeness of the variables in the feature set.
[0083] The causal fidelity assumption states that, given a set of variables V, variable v i and variable v j If variables are mutually independent or conditionally independent, then in a causal network graph G consisting of variables and their causal dependencies, variable v i and variable v j If all paths between variables are separated by appropriate variables d in the variable set V, then the joint distribution P of all variables is said to be causally faithful to the graph G.
[0084] Therefore, if the second target variable is included in the first feature candidate set, the second regression model will be rebuilt and the second feature candidate set will be redetermined based on the second regression model.
[0085] The difference between step 103 and step 101 is that the second regression model has one less target variable than the first regression model. The rest is similar. Therefore, you can refer to the relevant explanation of step 101 to understand step 103.
[0086] Step 104: Determine the second feature candidate set based on the second regression model. The second feature candidate set includes at least one variable among N variables, excluding the first target variable and the second target variable.
[0087] As one possible approach, step 104 includes: calculating the second contribution of each variable in the second regression model and the second saddle point in the second regression model; selecting variables in the second regression model whose second contribution is greater than the second saddle point to form a second feature candidate set.
[0088] It should be noted that step 104 is similar to step 102, and you can refer to the relevant explanation of step 102 for a detailed understanding.
[0089] Step 105: Determine the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the second feature candidate set, as well as the second feature candidate set.
[0090] Specifically, variables that have a causal relationship with the first target variable can be selected from the second feature candidate set to form the feature set of the first target variable.
[0091] Variables causally related to the first target variable can be identified using a causal relationship graph. In a causal relationship graph, the relationship between parent and child nodes represents the causal relationship. Therefore, a causal relationship graph with N variables can be constructed first, and then the HITON-PC algorithm can be used to find the variables represented by the parent nodes and child nodes of the first target variable to obtain the feature set of the first target variable. Here, PC in the HITON-PC algorithm is an abbreviation for the set of parent and child nodes of the first target variable.
[0092] It should be noted that the first feature candidate set may contain variables that are not present in the second feature candidate set. Therefore, in order to obtain a more complete and comprehensive feature set, the first feature candidate set and the second feature candidate set can be combined.
[0093] Specifically, as one possible approach, step 105 includes:
[0094] The third feature candidate set is obtained based on the first feature candidate set and the second feature candidate set. The third feature candidate set is obtained by removing the second target variable from the union of the first feature candidate set and the second feature candidate set.
[0095] The feature set of the first target variable is determined based on the causal relationship between the first target variable and the variables in the third feature candidate set, as well as the third feature candidate set.
[0096] It is understandable that, since there is a deterministic relationship between the second target variable and the first target variable, the second target variable is removed after the third feature candidate set is obtained.
[0097] Since the process of determining the feature set of the first target variable based on the third feature candidate set is similar to the process of determining the feature set of the first target variable based on the second feature candidate set, the process of determining the feature set of the first target variable based on the third feature candidate set can be understood by referring to the relevant explanation of the process of determining the feature set of the first target variable based on the second feature candidate set.
[0098] Step 106: If the first feature candidate set does not include the second target variable, determine the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the first feature candidate set, and the first feature candidate set.
[0099] It is understandable that, since the first feature candidate set does not include the second target variable, the feature set of the first target variable can be directly determined using the first feature candidate set.
[0100] Since the process of determining the feature set of the first target variable based on the first feature candidate set is similar to the process of determining the feature set of the first target variable based on the second feature candidate set, the process of determining the feature set of the first target variable based on the first feature candidate set can be understood by referring to the relevant explanation of the process of determining the feature set of the first target variable based on the second feature candidate set.
[0101] In this embodiment, a feature set is determined based on the causal relationship between the target variable and other variables. Since causal relationships are generally more stable than correlational relationships, a better feature set can be obtained. This allows the variables in the selected feature set to better predict the target variable, and the prediction model built based on the feature set has better robustness to different scenarios, enabling it to be more effectively extended to more scenarios. Furthermore, in terms of interpretability, the feature selection method provided in this embodiment can discover the local causal relationship structure of the target variable, thus providing operations engineers with more interpretable information to assist in decision-making.
[0102] Furthermore, if the first candidate feature set contains a second target variable that has a deterministic relationship with the first target variable, the second target variable will affect the fitting of other variables to the first target variable, causing some variables to be missed in the determined first candidate feature set. Based on this, the embodiments of this application adopt a two-stage algorithm to obtain the feature set. That is, firstly, the first candidate feature set is determined by the first regression model. If the first candidate feature set contains a second target variable that has a deterministic relationship with the first target variable, then the second candidate feature set is determined by the second regression model. Then, the feature set is determined by the second candidate feature set, thereby avoiding the omission of variables in the feature set. Moreover, it can also effectively reduce the selection range of the feature set and significantly reduce the computation time consumption.
[0103] The methods provided in the embodiments of this application have been described above. To facilitate understanding, the methods provided in the embodiments of this application will be further explained below through an application example.
[0104] Examples of applications are as follows.
[0105] like Figure 4 As shown, N variables include feature variables X1, X2, X3, X4, X5, X6, X7 and target variables Y1, Y2, and the causal relationship is as follows: Figure 4 As shown. In Figure 4In the diagram, arrows indicate causal relationships, and there is a deterministic relationship between target variable Y1 and target variable Y2.
[0106] like Figure 5 As shown, the process of determining the feature set includes: establishing a first regression model with feature variables X1, X2, X3, X4, X5, X6, X7 and target variable Y2 as independent variables and target variable Y1 as dependent variable; then calculating the contribution Ai and saddle point r1 for each feature; retaining features with contribution Ai greater than saddle point r1 as the first feature candidate set S1. If target variable Y2 exists in the first feature candidate set S1, then establishing a second regression model with feature variables X1, X2, X3, X4, X5, X6, X7 as independent variables and target variable Y1 as dependent variable; then calculating the contribution Bi and saddle point r2 for each feature; retaining features with contribution Bi greater than saddle point r2 as the second feature candidate set S2. Next, the union of the first and second feature candidate sets S1 and S2 is calculated, and target variable Y2 is removed from the union to obtain the third feature candidate set S3. Finally, a causal feature selection algorithm is used to select the child nodes and parent nodes of target variable Y1 from the third feature candidate set S3 as the final feature set.
[0107] like Figure 6 As shown in the embodiment of this application, a feature selection device is also provided, including: a model building unit 301, used to build a first regression model with N variables, the N variables including a first target variable and a second target variable, the first target variable and the second target variable having a deterministic relationship, the dependent variable of the first regression model being the first target variable, and the independent variables of the first regression model including other variables among the N variables besides the first target variable, where N is a positive integer greater than 2; a determination unit 302, used to determine a first feature candidate set based on the first regression model, the first feature candidate set including at least one variable among multiple variables besides the first target variable; the model building unit... Unit 301 is used to establish a second regression model when the first feature candidate set includes the second target variable. The dependent variable of the second regression model is the first target variable, and the independent variables of the second regression model include other variables among N variables besides the first target variable and the second target variable. Unit 302 is used to determine the second feature candidate set according to the second regression model. The second feature candidate set includes at least one variable among N variables besides the first target variable and the second target variable. Unit 302 is used to determine the feature set of the first target variable according to the causal relationship between the first target variable and the variables in the first feature candidate set, and the second feature candidate set.
[0108] As one possible approach, the determining unit 302 is used to obtain a third feature candidate set based on the first feature candidate set and the second feature candidate set. The third feature candidate set is obtained by removing the second target variable from the union of the first feature candidate set and the second feature candidate set. The feature set of the first target variable is determined based on the causal relationship between the first target variable and the variables in the first feature candidate set, as well as the third feature candidate set.
[0109] As one possible approach, unit 302 is used to calculate the first contribution and first saddle point of each variable in the independent variables of the first regression model; variables with a first contribution greater than the first saddle point in the independent variables of the first regression model are selected to form the first feature candidate set.
[0110] As one possible approach, unit 302 is used to calculate the second contribution of each variable in the second regression model and the second saddle point in the second regression model; variables in the second regression model whose second contribution is greater than the second saddle point are selected to form the second feature candidate set.
[0111] As one possible approach, the determining unit 302 is also used to determine the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the first feature candidate set, and the first feature candidate set, when the first feature candidate set does not include the second target variable.
[0112] As an implementation method, the model building unit 301 is used to obtain multiple samples that conform to independent and identical distribution based on the original time series data of N variables, each sample containing one value of N variables; and to build a first regression model based on the multiple samples.
[0113] As one possible approach, model building unit 301 is used to remove outlier data from the original time series data of N variables; based on the original time series data of N variables after removing outlier data, multiple samples conforming to independent and identically distributed distributions are obtained.
[0114] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device can be a server or a terminal device, specifically used to implement... Figure 6Corresponding to the function of the feature selection device in the embodiment; the computer device 1800 may vary considerably due to different configurations or performance, and may include one or more central processing units (CPUs) 1822 (e.g., one or more processors) and memory 1832, and one or more storage media 1830 (e.g., one or more mass storage devices) storing application programs 1842 or data 1844. The memory 1832 and storage media 1830 may be temporary or persistent storage. The program stored in the storage media 1830 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the computer device. Furthermore, the CPU 1822 may be configured to communicate with the storage media 1830 and execute the series of instruction operations in the storage media 1830 on the computer device 1800.
[0115] The computer device 1800 may also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input / output interfaces 1858, and / or one or more operating systems 1841, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0116] In this embodiment of the application, the central processing unit 1822 can be used to execute... Figure 6 The feature selection method executed by the feature selection device in the corresponding embodiment. Specifically, the central processing unit 1822 can be used for:
[0117] Establish a first regression model with N variables, including a first target variable and a second target variable. The first target variable and the second target variable have a deterministic relationship. The dependent variable of the first regression model is the first target variable. The independent variables of the first regression model include the other variables among the N variables except for the first target variable. N is a positive integer greater than 2.
[0118] The first feature candidate set is determined based on the first regression model. The first feature candidate set includes at least one variable other than the first target variable among multiple variables.
[0119] If the first feature candidate set includes the second target variable, a second regression model is established. The dependent variable of the second regression model is the first target variable, and the independent variables of the second regression model include the other variables among the N variables besides the first and second target variables.
[0120] The second feature candidate set is determined based on the second regression model. The second feature candidate set includes at least one variable among N variables, excluding the first target variable and the second target variable.
[0121] The feature set of the first target variable is determined based on the causal relationship between the first target variable and the variables in the second feature candidate set, as well as the second feature candidate set.
[0122] This application also provides a chip including one or more processors. Part or all of the processors are used to read and execute computer programs stored in a memory to perform the methods of the foregoing embodiments.
[0123] Optionally, the chip includes a memory, which is connected to the processor via a circuit or wire. Further optionally, the chip also includes a communication interface, to which the processor is connected. The communication interface is used to receive data and / or information that needs to be processed. The processor obtains the data and / or information from the communication interface, processes the data and / or information, and outputs the processing result through the communication interface. The communication interface can be an input / output interface.
[0124] In some implementations, some of the processors may implement some steps of the above method through dedicated hardware. For example, the processing of neural network models may be implemented by a dedicated neural network processor or graphics processor.
[0125] The method provided in this application embodiment can be implemented by a single chip or by multiple chips working together.
[0126] This application also provides a computer storage medium for storing computer software instructions for use with the aforementioned computer device, including instructions for executing programs designed for the computer device.
[0127] The computer device can be as described above. Figure 6 The function of the feature selection device in the corresponding embodiment.
[0128] This application also provides a computer program product, which includes computer software instructions that can be loaded by a processor to implement the processes in the methods shown in the foregoing embodiments.
[0129] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A feature selection method, characterized in that, include: A first regression model is established with N variables, including: the number of real-time registered users of the Access and Mobility Management Function (AMF), the number of successful reselections from the 4G network to the 5G network, the CPU utilization of the virtual machine, the memory utilization of the virtual machine, the hard disk read rate of the virtual machine, and the hard disk write rate of the virtual machine. The first target variable and the second target variable are the CPU utilization and the memory utilization, respectively. The first target variable and the second target variable have a deterministic relationship. The dependent variable of the first regression model is the first target variable. The independent variables of the first regression model include the other variables among the N variables except for the first target variable. N is a positive integer greater than 2. A first feature candidate set is determined based on the first regression model, and the first feature candidate set includes at least one variable among the plurality of variables other than the first target variable; If the first feature candidate set includes the second target variable, a second regression model is established. The dependent variable of the second regression model is the first target variable, and the independent variables of the second regression model include the other variables among the N variables besides the first target variable and the second target variable. A second feature candidate set is determined based on the second regression model. The second feature candidate set includes at least one variable among the N variables, excluding the first target variable and the second target variable. The feature set of the first target variable is determined based on the causal relationship between the first target variable and the variables in the second feature candidate set, as well as the second feature candidate set.
2. The method according to claim 1, characterized in that, The step of determining the feature set of the first target variable based on the causal relationship between the first target variable and variables in the second feature candidate set, and the second feature candidate set, includes: A third feature candidate set is obtained based on the first feature candidate set and the second feature candidate set. The third feature candidate set is obtained by removing the second target variable from the union of the first feature candidate set and the second feature candidate set. The feature set of the first target variable is determined based on the causal relationship between the first target variable and the variables in the third feature candidate set, and the third feature candidate set.
3. The method according to claim 1 or 2, characterized in that, Determining the first feature candidate set based on the first regression model includes: Calculate the first contribution and the first saddle point of each variable in the independent variables of the first regression model. The variables whose first contribution is greater than the first saddle point among the independent variables of the first regression model are selected to form the first feature candidate set.
4. The method according to any one of claims 1 to 2, characterized in that, The step of determining the second feature candidate set based on the second regression model includes: Calculate the second contribution of each variable in the independent variables of the second regression model and the second saddle point in the second regression model; The variables whose second contribution is greater than the second saddle point among the independent variables of the second regression model are selected to form the second feature candidate set.
5. The method according to any one of claims 1 to 2, characterized in that, The method further includes: If the first feature candidate set does not include the second target variable, the feature set of the first target variable is determined based on the causal relationship between the first target variable and the variables in the first feature candidate set, as well as the first feature candidate set.
6. The method according to any one of claims 1 to 2, characterized in that, The establishment of the first regression model with N variables includes: Based on the original time series data of N variables, multiple samples conforming to independent and identically distributed distributions are obtained, and each sample contains one value of the N variables; A first regression model is established based on the multiple samples.
7. The method according to claim 6, characterized in that, The process of obtaining multiple samples that conform to independent and identically distributed distributions based on the original time series data of N variables includes: Remove outliers from the original time series data with N variables; Based on the original time series data of the N variables after removing the outliers, multiple samples conforming to independent and identically distributed distributions are obtained.
8. A feature selection device, characterized in that, include: The model building unit is used to build a first regression model with N variables, including: the number of real-time registered users of the Access and Mobility Management Function (AMF), the number of successful reselections from the 4G network to the 5G network, the CPU utilization of the virtual machine, the memory utilization of the virtual machine, the hard disk read rate of the virtual machine, and the hard disk write rate of the virtual machine. The first target variable and the second target variable are the CPU utilization and the memory utilization, respectively. The first target variable and the second target variable have a deterministic relationship. The dependent variable of the first regression model is the first target variable. The independent variables of the first regression model include the other variables among the N variables except for the first target variable. N is a positive integer greater than 2. The determining unit is configured to determine a first feature candidate set based on the first regression model, wherein the first feature candidate set includes at least one variable among the plurality of variables other than the first target variable; The model building unit is used to build a second regression model when the first feature candidate set includes the second target variable. The dependent variable of the second regression model is the first target variable, and the independent variables of the second regression model include the other variables among the N variables besides the first target variable and the second target variable. The determining unit is configured to determine a second feature candidate set based on the second regression model, wherein the second feature candidate set includes at least one variable among the N variables other than the first target variable and the second target variable; The determining unit is used to determine the feature set of the first target variable based on the causal relationship between the first target variable and the variables in the second feature candidate set, and the second feature candidate set.
9. A computer device, characterized in that, The computer device includes: a memory and a processor, wherein N is a positive integer; The processor is configured to execute computer programs or instructions stored in a memory to cause the computer device to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium has program instructions that, when executed directly or indirectly, cause the method as described in any one of claims 1 to 7 to be implemented.
11. A chip system, characterized in that, The chip system includes at least one processor for executing a computer program or instructions stored in a memory, wherein when the computer program or instructions are executed in the at least one processor, the method described in any one of claims 1 to 7 is implemented.
12. A computer program product, characterized in that, Includes instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method and device
CN110147388A
Credit evaluation variable screening method and device, computer equipment and storage medium
CN112529477A