CN117744808A - Decision method and device based on causal effect estimation model and related equipment - Google Patents
Decision method and device based on causal effect estimation model and related equipment Download PDFInfo
- Publication number
- CN117744808A CN117744808A CN202311864676.0A CN202311864676A CN117744808A CN 117744808 A CN117744808 A CN 117744808A CN 202311864676 A CN202311864676 A CN 202311864676A CN 117744808 A CN117744808 A CN 117744808A
- Authority
- CN
- China
- Prior art keywords
- variable
- intervention
- result
- target
- causal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000001364 causal effect Effects 0.000 title claims abstract description 121
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000012549 training Methods 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 11
- 230000035772 mutation Effects 0.000 claims description 6
- 238000013473 artificial intelligence Methods 0.000 abstract description 4
- 238000004422 calculation algorithm Methods 0.000 description 19
- 230000007306 turnover Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000005457 optimization Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 210000000349 chromosome Anatomy 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000010801 machine learning Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 230000002068 genetic effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000010845 search algorithm Methods 0.000 description 2
- 101000822695 Clostridium perfringens (strain 13 / Type A) Small, acid-soluble spore protein C1 Proteins 0.000 description 1
- 101000655262 Clostridium perfringens (strain 13 / Type A) Small, acid-soluble spore protein C2 Proteins 0.000 description 1
- 101000655256 Paraclostridium bifermentans Small, acid-soluble spore protein alpha Proteins 0.000 description 1
- 101000655264 Paraclostridium bifermentans Small, acid-soluble spore protein beta Proteins 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- VZCCETWTMQHEPK-QNEBEIHSSA-N gamma-linolenic acid Chemical compound CCCCC\C=C/C\C=C/C\C=C/CCCCC(O)=O VZCCETWTMQHEPK-QNEBEIHSSA-N 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The disclosure provides a decision method, a decision device and relevant equipment based on a causal effect estimation model, and relates to the technical field of artificial intelligence, wherein the method comprises the following steps: determining an intervention variable and a result variable from a plurality of variables of a sample dataset, wherein a causal relationship exists between the intervention variable and the result variable; training an initial causal model by utilizing the sample data set according to the intervention variable and the result variable to obtain a causal effect estimation model, wherein the causal effect estimation model is used for estimating the influence degree of the intervention variable on the result variable; and determining a target value of the intervention variable from a plurality of candidate values of the intervention variable according to the causal effect estimation model and a business decision target, wherein the target value is matched with the business decision target, and the business decision target has an association relation with the result variable. The method and the device can improve the determination efficiency of the target implementation scheme.
Description
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to a decision method, a decision device and related equipment based on a causal effect estimation model.
Background
In the related art, machine learning and deep learning technologies are used to complete a prediction task, that is, predict the performance of a specific index under new data according to a model obtained by training historical data.
In the application, it is found that, in the case that a user gives a target, only the performance of a specific index under new data is predicted, and a scheme for achieving the target cannot be provided for the user.
In the related art, a user needs to obtain a hypothetical value of new data through a feature importance mode, an expert experience mode and the like, predict a prediction result corresponding to the hypothetical value of the new data through a traditional deep learning or machine learning model, and finally screen and determine a scheme capable of achieving the target from a plurality of groups of hypothetical values of the new data by comparing whether the prediction result is consistent with a given target.
That is, in the case that a user gives a decision target, the efficiency of determining the target implementation scheme based on the related technology is low, the accuracy is low, and the labor cost is high; and the related art can only provide predictive services for users, cannot effectively provide decision support capability for users, i.e. cannot provide specific actions or decision schemes for users to achieve the goal.
Disclosure of Invention
The disclosure aims to provide a decision method, a decision device and related equipment based on a causal effect estimation model, which are used for solving the technical problem that the efficiency of determining a target implementation scheme is low under the condition that a user gives a target in the related technology.
In a first aspect, an embodiment of the present disclosure provides a causal effect estimation model-based decision method, including:
determining an intervention variable and a result variable from a plurality of variables of a sample dataset, wherein a causal relationship exists between the intervention variable and the result variable;
training an initial causal model by utilizing the sample data set according to the intervention variable and the result variable to obtain a causal effect estimation model, wherein the causal effect estimation model is used for estimating the influence degree of the intervention variable on the result variable;
and determining a target value of the intervention variable from a plurality of candidate values of the intervention variable according to the causal effect estimation model and a business decision target, wherein the target value is matched with the business decision target, and the business decision target has an association relation with the result variable.
In one embodiment of the present invention, in one embodiment,
The determining, according to the causal effect estimation model and the business decision goal, a target value of the intervention variable from a plurality of candidate values of the intervention variable includes:
repeatedly executing the processing of the multiple candidate values of the intervention variable by using the causal effect estimation model to obtain multiple candidate values of the result variable; and
updating the multiple candidate values of the intervention variable according to the business decision target and the multiple candidate values of the result variable until an iteration stop condition is met;
and determining a plurality of candidate values of the intervention variable in the last iteration after the iteration is stopped as the target value.
In one embodiment of the present invention, in one embodiment,
the ith execution of the repeated execution includes:
processing the plurality of candidate values corresponding to the ith iteration by using the causal effect estimation model to obtain a plurality of result values corresponding to the result variable of the ith iteration;
determining at least two result values from a plurality of result values corresponding to the result variable of the ith iteration according to the business decision target;
and performing crossover operation and/or mutation operation on at least two candidate values corresponding to the at least two result values to obtain a plurality of candidate values corresponding to the (i+1) th iteration, wherein i is a positive integer. In one embodiment of the present invention, in one embodiment,
The iteration stop condition includes at least one of:
the current iteration number is equal to a first preset threshold;
and in n groups of result values corresponding to n continuous iterations, the difference value between any two result values is smaller than or equal to a second preset threshold value, and n is an integer larger than 1.
In one embodiment of the present invention, in one embodiment,
the method further comprises the steps of:
determining a target search space for the intervention variable from the sample dataset;
and determining a plurality of initial candidate values of the intervention variable according to the target search space, wherein the plurality of initial candidate values are the plurality of candidate values corresponding to the 1 st iteration.
In one embodiment of the present invention, in one embodiment,
the determining a target search space for the intervention variable from the sample dataset comprises:
determining an initial search space for the intervention variable from the sample dataset;
under the condition that the intervention variable is one, the initial search space is limited according to the variable constraint condition of the intervention variable, and a target search space of the intervention variable is obtained;
and under the condition that a plurality of intervention variables are provided, limiting the initial search space according to the variable constraint condition of each intervention variable and the linkage constraint relation among the plurality of intervention variables to obtain a target search space of the intervention variable.
In one embodiment of the present invention, in one embodiment,
the value interval corresponding to the intervention variable in the sample data set is a first interval, and the value intervals corresponding to the plurality of candidate values of the intervention variable are second intervals;
in the case where the intervention variable is a continuous variable, the first interval is contained within the second interval;
in the case where the intervention variable is a discrete variable, the second interval is included in the first interval.
In a second aspect, embodiments of the present disclosure provide a causal effect estimation model-based decision device, the device comprising:
a variable determination module for determining an intervention variable and a result variable from a plurality of variables of a sample dataset, wherein a causal relationship exists between the intervention variable and the result variable;
the training module is used for training an initial causal model by utilizing the sample data set according to the intervention variable and the result variable to obtain a causal effect estimation model, and the causal effect estimation model is used for estimating the influence degree of the intervention variable on the result variable;
and the target determining module is used for determining a target value of the intervention variable from a plurality of candidate values of the intervention variable according to the causal effect estimation model and a business decision target, wherein the target value is matched with the business decision target, and the business decision target has an association relation with the result variable.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the causal effect estimation model based decision method described above.
In a fourth aspect, embodiments of the present disclosure also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the causal effect estimation model based decision method described above.
In the embodiment of the disclosure, a result variable and an intervention variable affecting the result variable are determined from a plurality of variables in a sample data set, and based on the determined result variable and intervention variable, an initial causal model is trained by applying the sample data set to obtain a causal effect estimation model for estimating the influence degree of the intervention variable on the result variable, namely, a quantitative representation of causal relation between the intervention variable and the result variable is realized, and under the condition that a service decision target is given by a user, the existence of the causal effect estimation model is utilized to quickly obtain the target value when the intervention variable is matched with the service decision target, so that an implementation scheme for determining the decision target through a causal inference technology is provided, and decision support capability can be effectively provided for the user.
Drawings
FIG. 1 is a schematic diagram of a causal effect estimation model-based decision method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic illustration of a causal graph provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a causal effect estimation model based decision device provided by an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
The following is an explanation of various names involved in the embodiments of the present disclosure.
Intervention variable (T): refers to a class of variables in the dataset that correspond to "causes" in causal relationships of interest to the user.
Outcome variable (Y): also referred to as output variables, refers to a class of variables that corresponds to "results" in the set of data, causal relationships of interest to the user.
A confusing variable (W): refers to a variable, of the plurality of variables corresponding to the dataset, that is related to both the outcome variable and the intervention variable.
The embodiment of the disclosure provides a causal effect estimation model-based decision method, as shown in fig. 1, comprising the following steps:
step 101, determining intervention variables and outcome variables from a plurality of variables of a sample dataset.
Wherein the sample data set comprises a plurality of pieces of sample data, and each of the sample data comprises a plurality of variable values corresponding to the plurality of variables, there being a causal relationship between the intervention variable and the outcome variable. Sample data of the sample data set is, for example, table data, as shown in table 1; the sample data may also be geographic data, time series data, data derived from medical databases, advertising data, and public economic statistics, etc., which are not limited in this embodiment of the present application.
The methods described in this disclosure may be applicable to any decision scenario, for example: store operation scenes, coupon issuing scenes, product recommendation scenes, and the like.
The plurality of sample data may be, for example, historical data of a corresponding decision scenario, for example: in a shop operation scenario, the pieces of sample data may be as shown in table 1:
TABLE 1
In this example, "number of employees", "store size", "area", "marketing investment", "turnover", etc. shown in table 1 are understood as the aforementioned plurality of variables, and "50", "80", "small", "medium", etc. are understood as the aforementioned plurality of variable values.
In this example, if the result variable is set as the turnover, the business decision goal may be to maximize the turnover, reach the turnover of 6500 ten thousand yuan or increase the turnover by 50% according to the different practical application scenarios; in the coupon issuing scenario, if the result variable is set as the purchase conversion rate, the business decision target may be to maximize the purchase conversion rate, which is not limited in the embodiment of the present application.
And 102, training an initial causal model by using the sample data set according to the intervention variable and the result variable to obtain a causal effect estimation model.
The causal effect estimation model is used for estimating the influence degree of the intervention variable on the result variable.
The initial causal model may be an algorithm model uploaded by the user, or may be an algorithm model determined by the user from a plurality of preset candidate algorithm models, or may be a specific algorithm model set by default. For example, the initial cause and effect model may be a double ML model or a CausalForest model, or the like.
In one example, the model output of the cause and effect estimation model may be set to the same dimension as the value of the result variable. In this case, if the model output of the causal effect estimation model is 0, indicating that the corresponding model input does not change the initial variable value of the outcome variable (e.g., where the effects of multiple intervention variables on the outcome variable cancel each other); if the model output of the causal effect estimation model is positive, indicating that the corresponding model input can cause the variable value of the result variable to be increased on the basis of the initial variable value, wherein the increasing amplitude is the absolute value of the causal effect estimation model output; when the model output of the causal effect estimation model is negative, indicating that the corresponding model input can cause the reduction of a result variable on the basis of an initial variable value, wherein the reduction amplitude is the absolute value of the causal effect estimation model output;
it should be understood that the number of the devices,
in the case where the intervention variable is one, the model input of the causal effect estimation model in this example may be: a variable value of the intervention variable; and the candidate values of the intervention variables are different;
in the case of multiple intervention variables, the model inputs of the causal effect estimation model in this example may be: the variable value of any one of the intervention variables or the combination of the values of at least two of the intervention variables.
And step 103, determining the target value of the intervention variable from a plurality of candidate values of the intervention variable according to the causal effect estimation model and the business decision target.
The target value is matched with the business decision target, and the business decision target has an association relationship with the result variable.
As previously mentioned, in the case of one intervention variable, a plurality of candidate values of said intervention variable may be understood as a plurality of variable values of one said intervention variable; the target value of the intervention variable is understood to be a variable value of the intervention variable.
In the case where the intervention variable is plural, the plural candidate values of the intervention variable include: a variable value of any one of the intervention variables and/or a combination of values of at least two of the intervention variables; the target value of the intervention variable may be understood as the variable value of any one of the intervention variables and/or may be understood as the combination of the values of at least two of the intervention variables.
It is emphasized that the candidate values of the plurality of intervention variables are different.
Where there are a plurality of intervention variables, the candidate values of the plurality of intervention variables are different from one another, it being understood that there is at least one of the following differences between the different candidate values:
The number of the intervention variables corresponding to the candidate values is different, the specific values of the intervention variables corresponding to the candidate values are different, and the intervention variables corresponding to the candidate values are different.
For example, candidate values of the intervention variables may be:
candidate value scheme one, employee number-50 (person), store size-small;
candidate value scheme II, employee number-50 (people), marketing investment 80 (ten thousand yuan);
candidate value scheme three, store size-small, marketing investment 80 (ten thousand yuan);
candidate value scheme four, employee number-40 (person), store size-small, marketing investment 80 (ten thousand yuan).
The target value is matched with the business decision target as follows: and inputting the target value into a causal effect estimation model, and obtaining model output meeting the business decision target.
The business decision target may be at least one of the following, which is not limited in the embodiments of the present application: and making the variable value of the result variable maximum or minimum, making the variable value of the result variable greater than or equal to a first preset value, making the increment of the variable value of the result variable greater than or equal to a second preset value, or making the decrement of the variable value of the result variable greater than or equal to a third preset value. The specific values of the first preset value, the second preset value and the third preset value may be determined according to actual application conditions, which are not limited in the embodiment of the present application.
In the method, a result variable and an intervention variable affecting the result variable are determined from a plurality of variables in a sample data set, and based on the determined result variable and the intervention variable, an initial causal model is trained by applying the sample data set to obtain a causal effect estimation model for estimating the influence degree of the intervention variable on the result variable, namely, the quantitative representation of causal relation between the intervention variable and the result variable is realized, and under the condition that a business decision target is given by a user, the existence of the causal effect estimation model is utilized to quickly obtain the target value when the intervention variable is matched with the business decision target, so that the determination efficiency of a target implementation scheme is improved.
In addition, in the related art, when the target implementation scheme is generated based on modes such as feature importance and expert experience, the scheme retry frequency is high, the efficiency is low, the accuracy is low, and the artificial factors such as the expert experience are highly relied on, but based on the method disclosed by the disclosure, the target value is determined by using a causal effect estimation model under the condition of defining a service decision target, and the target implementation scheme is formed based on the target value, so that the efficiency is high, adverse effects caused by the artificial factors can be reduced, and the finally formed target implementation scheme is more accurate.
In one embodiment of the present invention, in one embodiment,
the determining, according to the causal effect estimation model and the business decision goal, a target value of the intervention variable from a plurality of candidate values of the intervention variable includes:
repeatedly executing the processing of the multiple candidate values of the intervention variable by using the causal effect estimation model to obtain multiple candidate values of the result variable; and
updating the multiple candidate values of the intervention variable according to the business decision target and the multiple candidate values of the result variable until an iteration stop condition is met;
and determining a plurality of candidate values of the intervention variable in the last iteration after the iteration is stopped as the target value.
In the embodiment, the business decision target is taken as the updating direction, and the causality estimation model is utilized to iteratively update the plurality of candidate values of the intervention variable, so that the determination efficiency of the target value of the intervention variable can be accelerated.
Wherein the ith execution of the repeated execution includes:
processing the plurality of candidate values corresponding to the ith iteration by using the causal effect estimation model to obtain a plurality of result values corresponding to the result variable of the ith iteration;
Determining at least two result values from a plurality of result values corresponding to the result variable of the ith iteration according to the business decision target;
and performing crossover operation and/or mutation operation on at least two candidate values corresponding to the at least two result values to obtain a plurality of candidate values corresponding to the (i+1) th iteration, wherein i is a positive integer.
It should be noted that, the number of candidate values of the plurality of candidate values corresponding to the ith iteration is the same as the number of candidate values of the plurality of candidate values corresponding to the (i+1) th iteration.
Specifically, the process of processing the plurality of candidate values of the intervention variable by using the causal effect estimation model to obtain the plurality of candidate values of the result variable is as follows:
and using a plurality of candidate values of the intervention variable as model inputs of the causal effect estimation model, obtaining a plurality of model outputs of the causal effect estimation model after causal effect estimation processing is carried out by using the causal effect estimation model, and using the plurality of model outputs as a plurality of candidate values of the result variable.
According to the business decision target, the process of determining at least two result values from a plurality of result values corresponding to the result variable in the ith iteration specifically comprises the following steps:
Sorting the association degree of each candidate value and the business decision target in a plurality of candidate values of the result variable corresponding to the ith iteration according to the association degree from high to low, determining the first k result variables from the sorted plurality of candidate values of the result variable, determining the first k result variables as the at least two result values, wherein k is an integer greater than 1;
or,
and calculating the association degree of each candidate value and the business decision target in a plurality of candidate values of the result variable corresponding to the ith iteration, and determining the candidate value with the association degree larger than a preset association threshold value as the at least two result values from the plurality of candidate values of the result variable.
The crossover operation and the mutation operation can be understood as chromosome crossover processing and chromosome mutation processing executed based on a preset genetic algorithm, and at this time, at least two candidate values corresponding to the at least two result values are chromosomes of the preset genetic algorithm in corresponding iterations.
For example, the foregoing iterative updating operation of the plurality of candidate values of the intervention variable may be performed based on an optimization algorithm such as an evolutionary algorithm, a bayesian optimization algorithm, an NSGA-II search algorithm, or the like.
In one embodiment, the iteration stop condition includes at least one of:
the current iteration number is equal to a first preset threshold;
and in n groups of result values corresponding to n continuous iterations, the difference value between any two result values is smaller than or equal to a second preset threshold value, and n is an integer larger than 1.
The setting of the iteration stop condition can avoid unlimited updating of a plurality of candidate values of the intervention variable, so that the execution cost and the execution time consumption of the iteration updating operation are reduced while the plurality of candidate values of the intervention variable corresponding to the last iteration are ensured to meet the business decision target through limited times of iteration updating.
Among n sets of result values corresponding to n successive iterations, the case that the difference between any two result values is smaller than or equal to a second preset threshold value is: in n consecutive iterations, the variation amplitude of the result variable value corresponding to the multiple candidate values of the intervention variable is lower than the preset amplitude fluctuation threshold, and at this time, the result variable value corresponding to the multiple candidate values of the intervention variable can be considered to be in a convergence trend in n consecutive iterations.
In one embodiment, the method further comprises:
Determining a target search space for the intervention variable from the sample dataset;
and determining a plurality of initial candidate values of the intervention variable according to the target search space, wherein the plurality of initial candidate values are the plurality of candidate values corresponding to the 1 st iteration.
In some embodiments, an initial candidate value for the intervention variable is determined from the target search space, e.g., a random search from the target search space. The initial candidate value is the candidate value corresponding to the intervention variable in the subsequent 1 st iteration or the first execution in the repeated execution steps.
The method comprises the steps of determining the target search space of the intervention variable based on a sample data set instead of determining the target search space of the intervention variable based on human experience, so that interference of human factors can be avoided, and difficulty of a user in applying the method disclosed by the disclosure can be reduced, namely, a user with insufficient or missing service experience can still construct the target search space of the intervention variable by using the method disclosed by the disclosure so as to continue a subsequent related flow, and a target value when the intervention variable is matched with the service decision target is obtained.
In this way, the generation of unreasonable candidate values can be avoided by determining a plurality of initial candidate values for the intervention variable in the target search space.
Specifically, the determining the target search space of the intervention variable according to the sample data set includes:
determining an initial search space for the intervention variable from the sample dataset;
under the condition that the intervention variable is one, the initial search space is limited according to the variable constraint condition of the intervention variable, and a target search space of the intervention variable is obtained;
and under the condition that a plurality of intervention variables are provided, limiting the initial search space according to the variable constraint condition of each intervention variable and the linkage constraint relation among the plurality of intervention variables to obtain a target search space of the intervention variable.
After an initial search space of an intervention variable is determined based on a sample data set, the initial search space is limited based on a variable constraint condition of the intervention variable and a linkage constraint relation among a plurality of intervention variables so as to adapt to a value constraint existing in a dry pre-variable in actual application, so that the application of the method disclosed by the disclosure is more flexible, and the accuracy of the target value of the finally output intervention variable can be improved.
The linkage constraint relation between the variable constraint condition of the intervention variable and a plurality of the intervention variables can be understood as a value limitation of the intervention variable in practical application, for example, when the intervention variable is a store size, the corresponding value in the initial search space can be small, medium and large, but when the intervention variable is specific to a certain store, the store size only supports two types of small and medium due to the limited store space, and at the moment, the variable constraint condition of the intervention variable is that the value of one store size cannot be large;
For another example, when the plurality of intervention variables include a store size and a staff number, and the value of one item of the store size is only small or medium, although the corresponding value of the staff number in the initial search space is 10-100, the maximum number of staff that can be accommodated by the small or medium store size is 70, then the linkage constraint relationship can be considered as: the value of one employee number cannot exceed 70.
In one embodiment, the value interval corresponding to the intervention variable in the sample data set is a first interval, and the value intervals corresponding to the plurality of candidate values of the intervention variable are second intervals;
in the case where the intervention variable is a continuous variable, the first interval is contained within the second interval;
in the case where the intervention variable is a discrete variable, the second interval is included in the first interval.
In this embodiment, based on a plurality of variable values corresponding to the intervention variable in the sample data set, a first interval is determined, and based on a variable type of the intervention variable, the first interval is adaptively increased or decreased to form a target search space of the intervention variable, so that a plurality of initial candidate values of the determined intervention variable can be more accurate.
For example, in a shop operation scenario, when the intervention variable is a shop size, and the variable value corresponding to the shop size in the plurality of sample data includes "large, medium, and small" (when the intervention variable is a discrete variable), the variable value corresponding to the shop size in the target search space/initial search space may be "large", "medium", or "small";
in addition, when the intervention variable is a marketing input (at this time, the intervention variable is a continuous variable), and the variable corresponding to the marketing input in the plurality of pieces of sample data has a maximum value a and a minimum value B, the variable corresponding to the marketing input in the initial search space/the target search space may have a value between L1 and L2, where L1 is greater than or equal to a, and L2 is less than or equal to B, for example: l1 may be set to twice A and L2 to one half B.
In one embodiment, determining the intervention variable and the outcome variable from a plurality of variables of the sample dataset comprises:
obtaining a result variable input by a user;
and determining at least one item of target causal relation in a causal graph corresponding to the sample data set according to the result variable, wherein the result characteristic of the target causal relation is the result variable, and the reason characteristic of the target causal relation is the intervention variable.
In this embodiment, after the result variable input by the user is obtained, at least one target causal relationship with the result variable as a result feature is determined through the causal graph, so that the intervention variable is determined in a manner that the probability of missing the intervention variable or misplacing the intervention variable by the user can be reduced, the accuracy of the determined intervention variable is improved, the reliability of a subsequently generated causal effect estimation model is further ensured, and the final output target value is more accurate.
It can be appreciated that, to enhance flexibility of the method of the present disclosure in application, the at least one landmark causal relationship may be presented to a user, and support autonomous determination of some or all intervention variables by the user through manual input, for example: the user may determine some or all of the causal characteristics of the at least one target causal relationship presented as the intervention variable, and the user may determine other variables than the variables contained by the at least one target causal relationship as the intervention variable.
In one example, the determination of the causal graph corresponding to the sample dataset may be:
loading a plurality of pieces of sample data included in a sample data set, determining causal relationships among a plurality of variables in the plurality of pieces of sample data by using a causal discovery model, and forming the causal graph according to the determined plurality of causal relationships; the causal discovery model may be determined by a user based on actual demands, or may be preset, for example, the causal discovery algorithm may include, but is not limited to, at least one of PC, GES, liNGAM, ANM algorithm models.
For ease of understanding, examples are illustrated below:
in the store operation scenario, the foregoing data set corresponding to table 1 describes the sales situation of a certain chain store, including the operation data of different sizes of branches in different areas, and with respect to the data in table 1, the enterprise manager wants to know how to optimize the size and marketing investment of each branch, so that the sales of each branch can be maximized.
As can be seen from the above, as shown in fig. 2, the corresponding variables in this example include area, store size, number of staff, marketing investment, area and turnover, the result variables are turnover, the intervention variables are store size and marketing investment, the area, number of staff and area are confusion variables, and the decision goal is to maximize turnover of each branch store.
After the information is determined, a causal inference algorithm can be utilized to train a plurality of pieces of data of the data set, so as to obtain a causal effect estimation model of an intervention variable T (refer to store scale and marketing investment) on an output variable Y (refer to sales), and the method comprises the following specific procedures:
the user selects an initial causal model adapting to the current scene demand, the input parameters of the initial causal model are defined as intervention variable values and result variable values in a plurality of pieces of data of a data set, and model training is carried out on the initial causal model based on the plurality of pieces of data of the data set so as to obtain a causal effect estimation model of store scale and marketing investment on sales.
In some embodiments, the search space (i.e., the target search space) of the intervention variable may be further constructed according to the constraint condition of the intervention variable (i.e., the constraint condition of the variable of each intervention variable and the linkage constraint relation between a plurality of intervention variables), where the constraint condition may be a rule corresponding to a scene, expert experience, or other constraint condition.
Specifically, for discrete intervention variables, the corresponding search range (i.e., the initial search space described above) is all the values that occur in the sample, such as "store size", and the search range is all the categories that occur, including "large, medium, small"; for continuous intervention variables, such as "marketing efforts," it may be provided that the search range has a maximum value that is 2 times the maximum value of the variable in the dataset and a minimum value that is half the minimum value of the variable in the dataset.
And, when historical experience or other constraints exist, further constraints may be placed on the search space of the intervention variables; for example: according to historical experience, the range of marketing investment has a linear relation with the store scale, or the store scale of a certain area does not have the option of large scale, and the like.
Taking decision target pseudo turnover maximization as an example, after obtaining a causal effect estimation model and a search range of intervention variables, an optimization function can be defined:
max Y(T 1 ,T 2 ,…,T n ),n∈Z+
s.t.f(T 1 ),f(T 2 ),…,f(T n )
in the above, maxY means maximizing sales and T n Refers to the variable value of the nth intervention variable, n is the total number of intervention variables, f (T) n ) Refers to the constraint that the nth intervention variable is required to satisfy.
Then, the user selects an optimization algorithm (not limited to an evolutionary algorithm, a bayesian optimization algorithm, an NSGA-II search algorithm, etc.), and searches in a search space of the intervention variable (i.e., a target search space of the intervention variable) based on the selected optimization algorithm, so as to perform the foregoing iterative updating operation on the multiple candidate values of the intervention variable, so as to obtain an optimal solution, i.e., obtain the target value of the intervention variable.
For example, if the optimization algorithm selected by the user is set as the evolutionary algorithm, the search process of the optimal solution may be:
step 1, defining population quantity P1, randomly obtaining initial values of P2 intervention variable combinations (namely a plurality of initial candidate values of the intervention variables) in a search space of the intervention variables, wherein P2 is more than P1;
step 2, inputting initial values of P2 intervention variable combinations into the causal effect estimation model to obtain P2 output results corresponding to sales;
Step 3, selecting and retaining P1 larger business value from the P2 results (namely the process of determining at least two result values from a plurality of result values corresponding to the result variables);
step 4, judging whether a stopping condition is met, if so, reaching a certain iteration number (namely, the current iteration number is equal to a first preset threshold value), or if the maximum value is converged (namely, the difference value between any two result values in any two result value combinations is smaller than or equal to a second preset threshold value in n result value combinations corresponding to n continuous iterations) and the like;
step 5, if the stopping condition is not met, continuing to optimize, intersecting and mutating the intervention variable combinations corresponding to the reserved P1 larger business value to obtain new P2 intervention variable combinations, and jumping back to the step 2, wherein the input of the step 2 after jumping back is the new P2 intervention variable combinations;
if the stopping condition is met, stopping optimization, and determining the P2 intervention variable combinations corresponding to the current iteration as the optimal solution.
For example, in this example, the optimal solution for store 2 may be: the store scale is improved from medium scale to large scale, and the marketing investment is improved from 100w to 120w, so that the sales can be improved to the maximum, and the sales can be improved to 3500 ten thousand.
Referring to fig. 3, fig. 3 is a causal effect estimation model-based decision device provided in an embodiment of the present disclosure, as shown in fig. 3, the causal effect estimation model-based decision device 300 includes:
a variable determination module 301 for determining an intervention variable and a result variable from a plurality of variables of a sample dataset, wherein a causal relationship exists between the intervention variable and the result variable;
the training module 302 is configured to train an initial causal model by using the sample data set according to the intervention variable and the result variable, so as to obtain a causal effect estimation model, where the causal effect estimation model is used to estimate the influence degree of the intervention variable on the result variable;
the objective determining module 303 is configured to determine, according to the causal effect estimation model and a service decision objective, an objective value of the intervention variable from a plurality of candidate values of the intervention variable, where the objective value matches with the service decision objective, and the service decision objective has an association relationship with the result variable.
In one embodiment, the targeting module 303 includes:
the iteration unit is used for repeatedly executing the processing of the plurality of candidate values of the intervention variable by using the causal effect estimation model to obtain a plurality of candidate values of the result variable; and
Updating the multiple candidate values of the intervention variable according to the business decision target and the multiple candidate values of the result variable until an iteration stop condition is met;
and the determining unit is used for determining a plurality of candidate values of the intervention variable in the last iteration after the iteration is stopped as the target value.
In one embodiment, the ith execution of the repeated execution includes:
processing the plurality of candidate values corresponding to the ith iteration by using the causal effect estimation model to obtain a plurality of result values corresponding to the result variable of the ith iteration;
determining at least two result values from a plurality of result values corresponding to the result variable of the ith iteration according to the business decision target;
and performing crossover operation and/or mutation operation on at least two candidate values corresponding to the at least two result values to obtain a plurality of candidate values corresponding to the (i+1) th iteration, wherein i is a positive integer.
In one embodiment, the iteration stop condition includes at least one of:
the current iteration number is equal to a first preset threshold;
and in n groups of result values corresponding to n continuous iterations, the difference value between any two result values is smaller than or equal to a second preset threshold value, and n is an integer larger than 1.
In one embodiment, the causal effect estimation model based decision device 300 further comprises:
a search space determination module for determining a target search space for the intervention variable from the sample dataset;
and the candidate value determining module is used for determining a plurality of initial candidate values of the intervention variable according to the target search space, wherein the initial candidate values are the candidate values corresponding to the 1 st iteration.
In one embodiment, the search space determining module is specifically configured to:
determining an initial search space for the intervention variable from the sample dataset;
under the condition that the intervention variable is one, the initial search space is limited according to the variable constraint condition of the intervention variable, and a target search space of the intervention variable is obtained;
and under the condition that a plurality of intervention variables are provided, limiting the initial search space according to the variable constraint condition of each intervention variable and the linkage constraint relation among the plurality of intervention variables to obtain a target search space of the intervention variable.
In one embodiment, the value interval corresponding to the intervention variable in the sample data set is a first interval, and the value intervals corresponding to the plurality of candidate values of the intervention variable are second intervals;
In the case where the intervention variable is a continuous variable, the first interval is contained within the second interval;
in the case where the intervention variable is a discrete variable, the second interval is included in the first interval.
The decision support apparatus 300 provided in the embodiments of the present disclosure can implement each process in the embodiment of the decision method based on the causal effect estimation model, and in order to avoid repetition, a detailed description is omitted here.
According to an embodiment of the disclosure, the disclosure further provides an electronic device, a readable storage medium.
Fig. 4 illustrates a schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 4, the apparatus 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a Read-Only Memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access Memory (Random Access Memory, RAM) 403. In RAM 403, various programs and data required for the operation of device 400 may also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Various components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, etc.; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 401 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 401 include, but are not limited to, a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphic Process Unit, GPU), various dedicated artificial intelligence (Artificial Intelligence, AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (Digital Signal Processing, DSP), and any suitable processors, controllers, microcontrollers, etc. The calculation unit 401 performs the various methods and processes described above, such as decision methods based on causal effect estimation models. For example, in some embodiments, the causal effect estimation model based decision method may be implemented as a computer software program, which is tangibly embodied on a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the causal effect estimation model based decision method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the causal effect estimation model based decision method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuitry, field programmable gate arrays (Field-Programmable Gate Array, FPGA), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), application specific standard products (Application Specific Standard Product, ASSP), system On Chip (SOC), complex programmable logic devices (Complex Programmable Logic Device, CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (10)
1. A causal effect estimation model-based decision method, the method comprising:
determining an intervention variable and a result variable from a plurality of variables of a sample dataset, wherein a causal relationship exists between the intervention variable and the result variable;
training an initial causal model by utilizing the sample data set according to the intervention variable and the result variable to obtain a causal effect estimation model, wherein the causal effect estimation model is used for estimating the influence degree of the intervention variable on the result variable;
And determining a target value of the intervention variable from a plurality of candidate values of the intervention variable according to the causal effect estimation model and a business decision target, wherein the target value is matched with the business decision target, and the business decision target has an association relation with the result variable.
2. The method of claim 1, wherein determining the target value of the intervention variable from the plurality of candidate values of the intervention variable based on the causal effect estimation model and a business decision target comprises:
repeatedly executing the processing of the multiple candidate values of the intervention variable by using the causal effect estimation model to obtain multiple candidate values of the result variable; and
updating the multiple candidate values of the intervention variable according to the business decision target and the multiple candidate values of the result variable until an iteration stop condition is met;
and determining a plurality of candidate values of the intervention variable in the last iteration after the iteration is stopped as the target value.
3. The method of claim 2, wherein an ith execution of the repeated execution comprises:
Processing the plurality of candidate values corresponding to the ith iteration by using the causal effect estimation model to obtain a plurality of result values corresponding to the result variable of the ith iteration;
determining at least two result values from a plurality of result values corresponding to the result variable of the ith iteration according to the business decision target;
and performing crossover operation and/or mutation operation on at least two candidate values corresponding to the at least two result values to obtain a plurality of candidate values corresponding to the (i+1) th iteration, wherein i is a positive integer.
4. A method according to claim 3, wherein the iteration stop condition comprises at least one of:
the current iteration number is equal to a first preset threshold;
and in n groups of result values corresponding to n continuous iterations, the difference value between any two result values is smaller than or equal to a second preset threshold value, and n is an integer larger than 1.
5. The method according to any one of claims 1-4, further comprising:
determining a target search space for the intervention variable from the sample dataset;
and determining a plurality of initial candidate values of the intervention variable according to the target search space, wherein the plurality of initial candidate values are the plurality of candidate values corresponding to the 1 st iteration.
6. The method of claim 5, wherein the determining the target search space for the intervention variable from the sample dataset comprises:
determining an initial search space for the intervention variable from the sample dataset;
under the condition that the intervention variable is one, the initial search space is limited according to the variable constraint condition of the intervention variable, and a target search space of the intervention variable is obtained;
and under the condition that a plurality of intervention variables are provided, limiting the initial search space according to the variable constraint condition of each intervention variable and the linkage constraint relation among the plurality of intervention variables to obtain a target search space of the intervention variable.
7. The method of any one of claims 1-4, wherein a value interval corresponding to the intervention variable in the sample dataset is a first interval and a value interval corresponding to a plurality of candidate values of the intervention variable is a second interval;
in the case where the intervention variable is a continuous variable, the first interval is contained within the second interval;
in the case where the intervention variable is a discrete variable, the second interval is included in the first interval.
8. A causal effect estimation model based decision making apparatus, the apparatus comprising:
a variable determination module for determining an intervention variable and a result variable from a plurality of variables of a sample dataset, wherein a causal relationship exists between the intervention variable and the result variable;
the training module is used for training an initial causal model by utilizing the sample data set according to the intervention variable and the result variable to obtain a causal effect estimation model, and the causal effect estimation model is used for estimating the influence degree of the intervention variable on the result variable;
and the target determining module is used for determining a target value of the intervention variable from a plurality of candidate values of the intervention variable according to the causal effect estimation model and a business decision target, wherein the target value is matched with the business decision target, and the business decision target has an association relation with the result variable.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method according to any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311864676.0A CN117744808A (en) | 2023-12-29 | 2023-12-29 | Decision method and device based on causal effect estimation model and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311864676.0A CN117744808A (en) | 2023-12-29 | 2023-12-29 | Decision method and device based on causal effect estimation model and related equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117744808A true CN117744808A (en) | 2024-03-22 |
Family
ID=90250935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311864676.0A Pending CN117744808A (en) | 2023-12-29 | 2023-12-29 | Decision method and device based on causal effect estimation model and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117744808A (en) |
-
2023
- 2023-12-29 CN CN202311864676.0A patent/CN117744808A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4242955A1 (en) | User profile-based object recommendation method and device | |
CN110070382B (en) | Method and device for generating information | |
CN111369344B (en) | Method and device for dynamically generating early warning rules | |
WO2023103527A1 (en) | Access frequency prediction method and device | |
CN114065863A (en) | Method, device and system for federal learning, electronic equipment and storage medium | |
CN112257868A (en) | Method and device for constructing and training integrated prediction model for predicting passenger flow | |
CN112182118B (en) | Target object prediction method based on multiple data sources and related equipment thereof | |
CN113743971A (en) | Data processing method and device | |
CN112292696A (en) | Determining action selection guidelines for an execution device | |
CN114972877B (en) | Image classification model training method and device and electronic equipment | |
CN114240555A (en) | Click rate prediction model training method and device and click rate prediction method and device | |
CN111957053A (en) | Game player matching method and device, storage medium and electronic equipment | |
CN113761379B (en) | Commodity recommendation method and device, electronic equipment and medium | |
CN112231299B (en) | Method and device for dynamically adjusting feature library | |
EP4202777A1 (en) | Method and apparatus for distributing network layers in neural network model | |
CN115271257B (en) | Multi-zone atmospheric pollution cooperative regulation and control method and device and electronic equipment | |
CN113112311B (en) | Method for training causal inference model and information prompting method and device | |
CN114140033B (en) | Service personnel allocation method and device, electronic equipment and storage medium | |
CN115310590A (en) | Graph structure learning method and device | |
CN117744808A (en) | Decision method and device based on causal effect estimation model and related equipment | |
CN115185606A (en) | Method, device, equipment and storage medium for obtaining service configuration parameters | |
CN114692780A (en) | Entity information classification method, classification model training method, device and electronic equipment | |
CN114707660A (en) | Federal model training method and device, storage medium and electronic equipment | |
CN114048863A (en) | Data processing method, data processing device, electronic equipment and storage medium | |
CN114444606A (en) | Model training and data classification method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |