Sample size determination method and device and storage medium
By predetermining multiple original sample sizes and establishing a score mapping model, selecting the sample size that meets the stable conditions and the smallest sample size, the problem of poor stability and accuracy of the satisfaction prediction model caused by inaccurate sample size determination is solved, and the problem of poor stability and accuracy of the satisfaction prediction model is achieved. Reduce sample size while ensuring model stability and accuracy.
Patent Information
- Application Number
- CN202311029269.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-21
AI Technical Summary
Inaccurate sample size determination in the prior art leads to poor stability and accuracy of satisfaction prediction models.
By predetermining multiple original sample sizes, multiple score mapping models are established, the model stability parameters corresponding to each original sample size are determined, and the original sample size that meets the stability conditions and the smallest sample size is selected as the target sample size.
While ensuring the establishment of a relatively stable and accurate score mapping model, try to minimize the sample size and improve the stability and accuracy of satisfaction prediction.
Smart Images

Figure CN119494679A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a sample size determination method, device and storage medium. Background Art
[0002] It is common to conduct user satisfaction surveys by distributing questionnaires to users and collecting statistics, and then adjust the business. In related technologies, the distributed questionnaires can be used as training samples to train a satisfaction prediction model corresponding to the relevant business, and then determine the user satisfaction. Among them, the number of training samples has a great influence on the stability and accuracy of the satisfaction prediction model. Summary of the invention
[0003] In order to overcome the problem of poor stability and accuracy of the satisfaction prediction model caused by inaccurate sample size determination in the related art, the present disclosure provides a sample size determination method, which predetermines multiple original sample sizes and determines the score mapping models corresponding to the multiple original sample sizes, and then determines the model stability parameter corresponding to each original sample size according to the multiple score mapping models corresponding to each original sample size, and then selects the original sample size that meets the stability condition and has the smallest sample size from the multiple original sample sizes according to the model stability parameter as the target sample size. In this way, the sample size can be reduced as much as possible while ensuring the establishment of a relatively stable and accurate score mapping model.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for determining a sample size is provided, comprising:
[0005] Determine score mapping models corresponding to multiple original sample sizes, each of the original sample sizes corresponds to multiple score mapping models, and each of the score mapping models represents the impact factor scores of multiple impact factor satisfactions under different groups;
[0006] Determine a model stability parameter corresponding to each original sample size according to a plurality of score mapping models corresponding to each original sample size;
[0007] The original sample size whose model stability parameter satisfies the stability condition and whose sample size is the smallest among the multiple original sample sizes is determined as the target sample size.
[0008] Optionally, determining the score mapping models corresponding to the multiple original sample sizes includes:
[0009] Obtaining a basic sample, the multiple original sample sizes, and the number of repeated samplings corresponding to each original sample size;
[0010] Repeatedly sampling the basic sample according to the number of repeated samplings corresponding to each original sample size to obtain multiple groups of sampling samples corresponding to each original sample size;
[0011] A score mapping model is established according to each group of sampling samples corresponding to each original sample size, so as to obtain the score mapping models corresponding to the multiple original sample sizes.
[0012] Optionally, establishing a score mapping model according to each group of sampling samples corresponding to each original sample size includes:
[0013] For any group of sampling samples corresponding to any original sample size, according to the overall satisfaction label corresponding to each sampling sample in the group and the evidence weight values of multiple influencing factor satisfaction under different original sample groupings, the basic network is trained for multiple rounds to obtain the overall satisfaction prediction model corresponding to the group of sampling samples;
[0014] The overall satisfaction prediction model corresponding to the group of sampling samples is score mapped to obtain the score mapping model corresponding to the group of sampling samples.
[0015] Optionally, the model stability parameters include a prediction accuracy mean and a prediction accuracy standard deviation;
[0016] The step of determining the model stability parameter corresponding to each original sample size according to the impact factor scores included in the multiple score mapping models corresponding to each original sample size includes:
[0017] For any score mapping model corresponding to any original sample size, determine the overall score of each sampling sample corresponding to the score mapping model according to the multiple impact factor scores corresponding to the score mapping model;
[0018] Determine the prediction accuracy of the score mapping model according to the overall score of each sample corresponding to the score mapping model and the overall satisfaction label corresponding to each sample;
[0019] According to the prediction accuracies of the multiple score mapping models corresponding to each original sample size, the prediction accuracy mean and the prediction accuracy standard deviation corresponding to each original sample size are obtained.
[0020] Optionally, the model stability parameter also includes a single item score standard deviation;
[0021] The step of determining the model stability parameter corresponding to each original sample size according to the impact factor scores included in the multiple score mapping models corresponding to each original sample size includes:
[0022] For any original sample size, the standard deviation of the single item score corresponding to the same group of the original sample size is determined according to the impact factor scores for the same group in multiple score mapping models corresponding to the original sample size.
[0023] Optionally, determining the original sample size whose model stability parameter satisfies the stability condition and whose sample size is the smallest among the multiple original sample sizes as the target sample size includes:
[0024] Determine the original sample sizes whose standard deviations of all single-item scores are less than the first target standard deviation among the multiple original sample sizes, and obtain a first sample size set;
[0025] Determine the original sample size whose average prediction accuracy is greater than the target accuracy threshold among the multiple original sample sizes to obtain a second sample size set;
[0026] Determine the original sample size whose prediction accuracy standard deviation is less than the second target standard deviation among the multiple original sample sizes, and obtain a third sample size set;
[0027] Determine the intersection of the first sample size set, the second sample size set, and the third sample size set to obtain a fourth sample size set;
[0028] The original sample size with the smallest sample size in the fourth sample size set is determined as the target sample size.
[0029] Optionally, the sample includes an overall satisfaction label and an evidence weight value;
[0030] Before repeatedly sampling the basic sample according to the number of repeated samplings corresponding to each original sample size to obtain multiple groups of sampled samples corresponding to each original sample size, the method further includes:
[0031] Determine the overall satisfaction of each sample in the basic sample and the influence factor satisfaction of a plurality of influence factors associated with the overall satisfaction;
[0032] Discretizing the satisfaction of the impact factor to obtain the original sample grouping of each sample with respect to each impact factor;
[0033] Determine the overall satisfaction label of each sample in the basic sample according to the preset overall satisfaction threshold and the overall satisfaction of each sample;
[0034] According to the overall satisfaction label of each sample, the evidence weight values of multiple influencing factor satisfactions corresponding to each sample under different original sample groupings are obtained.
[0035] According to a second aspect of an embodiment of the present disclosure, there is provided a sample size determination device, comprising:
[0036] A first determination module is configured to determine score mapping models corresponding to a plurality of original sample sizes, each of the original sample sizes corresponds to a plurality of score mapping models, and each of the score mapping models represents the impact factor scores of a plurality of impact factor satisfactions in different groups;
[0037] A second determination module is configured to determine a model stability parameter corresponding to each original sample size according to a plurality of score mapping models corresponding to each original sample size;
[0038] The third determination module is configured to determine the original sample size whose model stability parameter meets the stability condition and whose sample size is the smallest among the multiple original sample sizes as the target sample size.
[0039] Optionally, the first determining module includes:
[0040] An acquisition submodule is configured to acquire a basic sample, the multiple original sample sizes, and the number of repeated samplings corresponding to each original sample size;
[0041] The first acquisition submodule is configured to repeatedly sample the basic sample according to the number of repeated samplings corresponding to each original sample size, so as to obtain multiple groups of sampled samples corresponding to each original sample size;
[0042] The second obtaining submodule is configured to establish a score mapping model according to each group of sampling samples corresponding to each original sample size, so as to obtain the score mapping models corresponding to the multiple original sample sizes.
[0043] Optionally, the second obtaining submodule includes:
[0044] The training subunit is configured to perform multiple rounds of training on the basic network for any group of sampling samples corresponding to any original sample size, according to the overall satisfaction label corresponding to each sampling sample in the group of sampling samples and the evidence weight values of multiple influencing factor satisfaction under different original sample groupings, so as to obtain the overall satisfaction prediction model corresponding to the group of sampling samples;
[0045] The obtaining subunit is configured to perform score mapping on the overall satisfaction prediction model corresponding to the group of sampling samples to obtain the score mapping model corresponding to the group of sampling samples.
[0046] Optionally, the model stability parameters include a prediction accuracy mean and a prediction accuracy standard deviation;
[0047] The second determining module includes:
[0048] The first determination submodule is configured to determine, for any score mapping model corresponding to any original sample size, an overall score of each sampling sample corresponding to the score mapping model according to multiple impact factor scores corresponding to the score mapping model;
[0049] A second determination submodule is configured to determine the prediction accuracy of the score mapping model according to the overall score of each sampled sample corresponding to the score mapping model and the overall satisfaction label corresponding to each sampled sample;
[0050] The third obtaining submodule is configured to obtain the prediction accuracy mean and the prediction accuracy standard deviation corresponding to each original sample size according to the prediction accuracy of multiple score mapping models corresponding to each original sample size.
[0051] Optionally, the model stability parameter also includes a single item score standard deviation;
[0052] The second determining module includes:
[0053] The third determination submodule is configured to determine, for any original sample size, the standard deviation of the single item scores of the original sample size corresponding to the same group according to the impact factor scores for the same group in multiple score mapping models corresponding to the original sample size.
[0054] Optionally, the third determining module includes:
[0055] A fourth determination submodule is configured to determine the original sample sizes whose standard deviations of all single-item scores are less than the first target standard deviation among the multiple original sample sizes, to obtain a first sample size set;
[0056] A fifth determination submodule is configured to determine the original sample size whose prediction accuracy mean is greater than the target accuracy threshold among the multiple original sample sizes, to obtain a second sample size set;
[0057] A sixth determination submodule is configured to determine the original sample size whose prediction accuracy standard deviation is less than the second target standard deviation among the multiple original sample sizes, to obtain a third sample size set;
[0058] a seventh determination submodule, configured to determine an intersection of the first sample size set, the second sample size set, and the third sample size set to obtain a fourth sample size set;
[0059] The eighth determination submodule is configured to determine the original sample size with the smallest sample size in the fourth sample size set as the target sample size.
[0060] Optionally, the sample includes an overall satisfaction label and an evidence weight value;
[0061] The device also includes:
[0062] A fourth determination module is configured to determine the overall satisfaction of each sample in the basic sample and the influencing factor satisfaction of multiple influencing factors associated with the overall satisfaction;
[0063] A first obtaining module is configured to discretize the influencing factor satisfaction to obtain an original sample grouping of each sample with respect to each influencing factor;
[0064] A fifth determination module is configured to determine an overall satisfaction label for each sample in the basic sample according to a preset overall satisfaction threshold and the overall satisfaction of each sample;
[0065] The second obtaining module is configured to obtain the evidence weight values of multiple influencing factor satisfactions corresponding to each sample under different original sample groupings according to the overall satisfaction label of each sample.
[0066] According to a third aspect of an embodiment of the present disclosure, there is provided a sample size determination device, including:
[0067] processor;
[0068] a memory for storing processor-executable instructions;
[0069] The processor is configured to implement the steps of the sample size determination method provided in the first aspect of the present disclosure.
[0070] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the sample size determination method provided in the first aspect of the present disclosure are implemented.
[0071] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0072] By determining the score mapping models corresponding to multiple original sample sizes, each original sample size corresponds to multiple score mapping models, each score mapping model characterizes the scores of multiple influencing factor satisfaction under different groups, and according to the multiple score mapping models corresponding to each original sample size, the model stability parameter corresponding to each original sample size is determined, and the original sample size with the smallest sample size and the model stability parameter satisfying the stability condition among the multiple original sample sizes is determined as the target sample size. By predetermining multiple original sample sizes and determining the score mapping models corresponding to the multiple original sample sizes, and then determining the model stability parameter corresponding to each original sample size according to the multiple score mapping models corresponding to each original sample size, and then selecting the original sample size satisfying the stability condition and the smallest sample size from the multiple original sample sizes according to the model stability parameter as the target sample size. In this way, the sample size can be minimized while ensuring the establishment of a relatively stable and accurate score mapping model.
[0073] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0075] Figure 1 is a schematic diagram of a method for determining a sample size according to an exemplary embodiment.
[0076] Figure 2 The figure is a flow chart of a method for determining a sample size according to an exemplary embodiment.
[0077] Figure 3 The invention is a flowchart of a method for determining multiple score mapping models according to an exemplary embodiment.
[0078] Figure 4 The figure is a flowchart of a method for establishing a score mapping model according to an exemplary embodiment.
[0079] Figure 5 The invention is a flowchart of a method for determining a target sample size according to an exemplary embodiment.
[0080] Figure 6 The figure is a block diagram of a device for determining a sample size according to an exemplary embodiment.
[0081] Figure 7 It is a block diagram of a device for determining a sample size according to an exemplary embodiment. DETAILED DESCRIPTION
[0082] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0083] For the overall satisfaction of services, such as sales services, we can obtain the evaluation of the overall satisfaction of different users on the services so as to improve the services and enhance the overall satisfaction of the services. We can establish relevant satisfaction prediction models, such as score mapping models, so as to predict the user satisfaction based on the obtained questionnaire samples. However, in the process of establishing the satisfaction prediction model, we need to distribute questionnaires to obtain a certain number of samples. However, if the number of distributed questionnaires is small, the satisfaction prediction model established will be unstable and have poor accuracy.
[0084] Based on the above technical problems, the present disclosure provides a method for determining sample size, which predetermines multiple original sample sizes and determines the score mapping models corresponding to the multiple original sample sizes, and then determines the model stability parameter corresponding to each original sample size according to the multiple score mapping models corresponding to each original sample size, and then selects the original sample size that meets the stability condition and has the smallest sample size from the multiple original sample sizes according to the model stability parameter as the target sample size. In this way, the sample size can be minimized while ensuring the establishment of a relatively stable and accurate score mapping model.
[0085] Figure 1 is a schematic diagram of a method for determining a sample size according to an exemplary embodiment. Figure 1 As shown, by first determining multiple original sample sizes, such as 1000, 5000 and 10000. Then, based on the basic sample, multiple groups of sampling samples corresponding to each original sample size are obtained, and a score mapping model is established based on each group of sampling samples. Based on multiple score models corresponding to each original sample size, the model stability parameter corresponding to each original sample size is determined, and finally, based on the model stability parameter, the original sample size that meets the stability condition and has the smallest sample size is determined as the target sample size, for example, 5000 is used as the target sample size. In this way, the sample size can be minimized while ensuring the establishment of a relatively stable and accurate score mapping model.
[0086] Figure 2 is a flow chart of a method for determining a sample size according to an exemplary embodiment. Figure 2 As shown, the method can be used for a server and includes the following steps.
[0087] In step S201, score mapping models corresponding to a plurality of original sample sizes are determined, each of the original sample sizes corresponds to a plurality of score mapping models, and each of the score mapping models represents the impact factor scores of a plurality of impact factor satisfactions in different groups.
[0088] In this embodiment, the original sample size is a predetermined candidate sample size, which can be determined according to actual conditions and experience, so as to select an original sample size from multiple original sample sizes as the target sample size. For example, the predetermined multiple original sample sizes are 1000, 5000 and 10000.
[0089] For each original sample size, multiple groups of sampling samples under the original sample size can be obtained, and multiple score mapping models can be established. Among them, each score mapping model includes the scores of the multiple influencing factors affecting the overall satisfaction in different groups. For example, the overall satisfaction can be the overall satisfaction with the shopping service, and the multiple influencing factors affecting the overall satisfaction can be logistics timeliness and delivery services, etc. The influencing factor satisfaction is the satisfaction corresponding to the influencing factor, such as logistics timeliness satisfaction and delivery service satisfaction. For the satisfaction with logistics timeliness, it can be divided into multiple groups based on the value of the satisfaction with logistics timeliness, for example, the first group, the second group and the third group. Each group corresponds to an influencing factor score. Different score mapping models may have different scores of the multiple influencing factors affecting the overall satisfaction in different groups. Each score mapping model can be constructed based on the corresponding overall satisfaction prediction model, and the overall satisfaction prediction model can be obtained based on the corresponding multiple sample training.
[0090] In step S202, a model stability parameter corresponding to each original sample size is determined according to multiple score mapping models corresponding to each original sample size.
[0091] In this embodiment, the stability of multiple score mapping models corresponding to each original sample size can be judged according to the impact factor scores corresponding to the score mapping models. A model stability parameter corresponding to each original sample size can be determined, and the model stability parameter characterizes the stability and accuracy of the model, and the stability of the score mapping model obtained under the original sample size is judged based on the model stability parameter. Among them, the model stability parameter can be at least one of the prediction accuracy mean, the prediction accuracy standard deviation, and the single score standard deviation.
[0092] In step S203, the original sample size whose model stability parameter meets the stability condition and whose sample size is the smallest among the multiple original sample sizes is determined as the target sample size.
[0093] In this embodiment, through the stability condition, the original sample size that can make the obtained model achieve better stability and accuracy can be determined, and the original sample size with the smallest sample size can be selected as the target sample size, so as to minimize the sample size while ensuring the establishment of a relatively stable and accurate score mapping model, so as to reduce operating costs.
[0094] In this embodiment, by predetermining multiple original sample sizes and determining the score mapping models corresponding to the multiple original sample sizes, and then determining the model stability parameters corresponding to each original sample size according to the multiple score mapping models corresponding to each original sample size, and then selecting the original sample size that meets the stability condition and has the smallest sample size from the multiple original sample sizes according to the model stability parameters as the target sample size. In this way, the sample size can be minimized while ensuring the establishment of a relatively stable and accurate score mapping model, so as to reduce the operating cost.
[0095] Figure 3 is a flowchart of a method for determining multiple score mapping models according to an exemplary embodiment. Figure 3 As shown, in a possible implementation manner, determining the score mapping models corresponding to multiple original sample sizes may include the following steps:
[0096] In step S301, a basic sample, a plurality of original sample sizes, and the number of repeated samplings corresponding to each original sample size are obtained.
[0097] In this embodiment, the basic sample is a sample set with a small number of samples. Questionnaires can be distributed in a small range according to the scope of the pre-surveyed customers, and the questionnaires can be collected to obtain the basic sample. Optionally, the collected questionnaires can also be cleaned to obtain the basic sample. For example, the cleaning rules are mainly to delete directly if the answer rate of the survey questionnaire question is lower than a certain set value, and to delete directly if the answer time is less than a certain set value. The answer time can be the end time of answering the question minus the start time of answering the question.
[0098] The multiple original sample sizes are predetermined alternative sample sizes, for example, the predetermined multiple original sample sizes are 1000, 5000 and 10000. Based on the basic sample, sampling with replacement can be performed to obtain samples of the original sample size. In order to avoid extreme cases in this process, for example, if the basic sample is 100 samples and the original sample size is 1000, the 500 samples collected during the sampling process are all the same sample. For each original sample size, a corresponding number of repeated sampling is set so that the sampling can be more uniform. Optionally, the original sample size is negatively correlated with the number of repeated sampling, that is, the smaller the original sample size, the greater the number of repeated sampling.
[0099] In step S302, the basic samples are repeatedly sampled according to the number of repeated samplings corresponding to each original sample size, so as to obtain multiple groups of sampled samples corresponding to each original sample size.
[0100] In this embodiment, the basic sample can be repeatedly sampled based on the original sample size and the number of repeated samplings, and each repeated sampling can obtain a group of sampled samples with the same number as the original sample size. For example, if the number of repeated samplings of a certain original sample size is 40, 40 groups of sampled samples can be obtained by sampling, and the number of samples in each group of sampled samples is the same as the number of original samples. In each repeated sampling process, based on the basic sample, multiple samplings can be performed continuously in a replaceable manner, and the number of samplings is equal to the original sample size.
[0101] In step S303, a score mapping model is established according to each group of sampling samples corresponding to each original sample size, so as to obtain score mapping models corresponding to multiple original sample sizes.
[0102] In this embodiment, each original sample size corresponds to multiple groups of sampled samples. For any group of sampled samples, a score mapping model can be established based on the group of sampled samples. That is, if one original sample size corresponds to 40 groups of sampled samples, 40 score mapping models can be obtained. If another original sample size corresponds to 20 groups of sampled samples, 20 score mapping models can be obtained. By establishing score mapping models for multiple groups of sampled samples corresponding to each original sample size, multiple score mapping models corresponding to each of the multiple original sample sizes can be obtained.
[0103] Figure 4 is a flowchart of a method for establishing a score mapping model according to an exemplary embodiment. Figure 4 As shown, in a possible implementation manner, establishing a score mapping model according to each group of sampling samples corresponding to each original sample size may include the following steps:
[0104] In step S401, for any group of sampling samples corresponding to any original sample size, the basic network is trained for multiple rounds according to the overall satisfaction label corresponding to each sampling sample in the group and the evidence weight values of multiple influencing factor satisfaction under different original sample groupings to obtain the overall satisfaction prediction model corresponding to the group of sampling samples.
[0105] In this embodiment, for multiple groups of sampled samples, each group of sampled samples includes sampled samples of the same number as the original sample amount, and each sampled sample corresponds to an overall satisfaction label, which is used to characterize whether the user's overall satisfaction is satisfied. For example, the overall satisfaction label is 1 or 0, 1 represents that the user's overall satisfaction is satisfied, and 0 represents that the overall satisfaction is dissatisfied. And each sampled sample includes multiple influencing factor satisfaction, each influencing factor satisfaction corresponds to an original sample group, and different original sample groups correspond to different evidence weight values, wherein the original sample group is the grouping of the influencing factor satisfaction in the sampled sample, which is the same as the grouping of the influencing factor satisfaction in the score mapping model, for example, it can also include logistics timeliness satisfaction and distribution service satisfaction. For the logistics timeliness satisfaction, it can be divided into multiple groups based on the value of the logistics timeliness satisfaction, for example, the first group, the second group and the third group. The evidence weight value represents the degree of influence on the overall satisfaction, and the corresponding evidence weight value can be determined by the original sample group to which the influencing factor belongs, thereby determining the degree of influence of the influencing factor on the overall satisfaction.
[0106] Optionally, each sampling sample includes an overall satisfaction label and an evidence weight value, and the overall satisfaction label and the evidence weight value can be determined for each sample in the basic sampling sample, so that after sampling the basic sample, each sampling sample obtained also includes an overall satisfaction label and an evidence weight value.
[0107] Optionally, the method for determining the overall satisfaction label and the evidence weight value for each sample in the basic sampling sample may be: determining the overall satisfaction of each sample in the basic sample and the influencing factor satisfaction of multiple influencing factors associated with the overall satisfaction; discretizing the influencing factor satisfaction to obtain the original sample grouping of each sample with respect to each influencing factor; determining the overall satisfaction label of each sample in the basic sample based on a preset overall satisfaction threshold and the overall satisfaction of each sample; and obtaining the evidence weight values of the multiple influencing factor satisfactions corresponding to each sample under different original sample groupings based on the overall satisfaction label of each sample.
[0108] In this embodiment, the overall satisfaction of each sample in the basic sample and the satisfaction of the influencing factors associated with the overall satisfaction are first determined, and the overall satisfaction and the satisfaction of the influencing factors are obtained by the user's response to the questionnaire. Then, the satisfaction of the influencing factors is discretized to obtain the original sample grouping of each sample with respect to each influencing factor. That is, for each influencing factor, grouping is performed according to its corresponding satisfaction of the influencing factors. For example, for logistics timeliness, the value interval of its satisfaction of logistics timeliness is 1 to 5, and the samples with a satisfaction of 1 for logistics timeliness can be divided into one group, the samples with a satisfaction of 2 to 3 for logistics timeliness can be divided into one group, and the samples with a satisfaction of 4 to 5 for logistics timeliness can be divided into one group. Then, according to the preset overall satisfaction threshold and the overall satisfaction of each sample, the overall satisfaction label of each sample in the basic sample is determined. Among them, the overall satisfaction label is 1 or 0, wherein 1 represents satisfaction and 0 represents dissatisfaction. For example, the preset interval of overall satisfaction is 1 to 10, and the preset overall satisfaction threshold is 9, that is, the overall satisfaction label of the sample with an overall satisfaction greater than or equal to 9 is set to 1, and the overall satisfaction label of the sample with an overall satisfaction less than 9 is set to 0.
[0109] Then, according to the overall satisfaction label of each sample, the evidence weight values of the satisfaction of multiple influencing factors corresponding to each sample under different original sample groups are obtained. The calculation formula of the evidence weight value can be:
[0110]
[0111] Among them, woe ij is the weight of evidence for the jth group of the ith influencing factor, p ij1 is the proportion of satisfied users in the jth group of the ith influencing factor to all satisfied users, p ij0 is the proportion of dissatisfied users in the jth group of the ith influencing factor to all satisfied users, S ij is the number of satisfied users in the jth group of the ith influencing factor, ST is the total number of satisfied users, UNS is ij is the number of dissatisfied users in the jth group of the i-th influencing factor, and UNST is the total number of dissatisfied customers. Among them, satisfied and dissatisfied are both satisfied and dissatisfied with the overall satisfaction. The above parameters can be obtained based on the satisfaction label of each sample user for the overall satisfaction.
[0112] In a possible implementation, the basic network may be a Logistic regression model, and the prediction formula of the model may be:
[0113]
[0114] Among them, α is the intercept term of the overall satisfaction prediction model, βi is the slope of the i-th influencing factor, woe ij is the weight of evidence for the jth group of the ith influencing factor, σ ij Whether to take the jth group of the i-th influencing factor is a binary variable, which is 1 if yes and 0 otherwise. For a factor i, only j can be taken at a time.
[0115] According to the overall satisfaction label corresponding to each sample in any group of sample samples and the evidence weight values of multiple influencing factors under different original sample groups, the basic network is trained for multiple rounds. After each round of training, the predicted probability value output by the basic network is obtained, and the predicted probability value ranges from 0 to 1. And according to the overall satisfaction label and the predicted probability value, the loss value is determined, and the basic network is optimized based on the loss value. Until the basic network meets the preset conditions, the preset conditions can be that the basic network converges or the number of training rounds reaches the preset number of rounds, the training can be stopped to obtain the overall satisfaction prediction model.
[0116] In step S402, score mapping is performed on the overall satisfaction prediction model corresponding to the group of sampling samples to obtain a score mapping model corresponding to the group of sampling samples.
[0117] Optionally, score mapping is performed on the overall satisfaction prediction model corresponding to the group of sampling samples. The method for obtaining the score mapping model corresponding to the group of sampling samples may be: obtaining the overall satisfaction prediction model, and based on the overall satisfaction prediction model, constructing a score mapping model according to the target mapping interval and target mapping rules.
[0118] The target mapping rule may be a linear mapping relationship between overall satisfaction and overall satisfaction score, and the formula for the overall satisfaction score is:
[0119]
[0120] And obtain the target mapping interval, which is the numerical interval of the overall satisfaction score, which can be a pre-set interval. The target mapping interval is determined by the maximum score and the minimum score. For example, the minimum score min_score can be 0, the maximum score max_score can be 10, and the target mapping interval can be [0, 10].
[0121] Then, the offset and factor can be obtained through the formula of the overall satisfaction score and the target mapping interval.
[0122] in,
[0123]
[0124] And based on the calculation formula of overall satisfaction:
[0125]
[0126] The calculation formula of the score mapping model is:
[0127]
[0128] Among them, the starting score of user satisfaction is: offset+factor×α, and the single score of influencing factor i in group j is: factor*βi*woeij*σij
[0129] The score sample table of the score mapping model is as follows:
[0130]
[0131]
[0132] The score sample table of the score mapping model shows the impact factor scores under different groups of impact factor satisfaction.
[0133] In a possible implementation, the model stability parameters include a prediction accuracy mean and a prediction accuracy standard deviation. According to the influencing factor scores included in the multiple score mapping models corresponding to each original sample size, the method for determining the model stability parameters corresponding to each original sample size may be: for any score mapping model corresponding to any original sample size, determine the overall score of each sampling sample corresponding to the score mapping model according to the multiple influencing factor scores corresponding to the score mapping model; determine the prediction accuracy of the score mapping model according to the overall score of each sampling sample corresponding to the score mapping model and the overall satisfaction label corresponding to each sampling sample; and obtain the prediction accuracy mean and the prediction accuracy standard deviation corresponding to each original sample size according to the prediction accuracy of the multiple score mapping models corresponding to each original sample size.
[0134] In this embodiment, any original sample size corresponds to multiple groups of sampled samples, each group of sampled samples corresponds to a score mapping model, each group of sampled samples includes samples of the original sample size, and for any score mapping model, it includes the scores of the multiple influencing factors affecting the overall satisfaction in different groups. According to the grouping of the satisfaction of different influencing factors for each sampled sample corresponding to the score mapping model, the scores of the influencing factors for each sampled sample for different influencing factors are obtained, and the sum of the scores of the multiple influencing factors corresponding to any sampled sample is determined as the overall score of the sampled sample.
[0135] The impact factor scores of different groups are shown in the following table:
[0136]
[0137]
[0138] Based on the overall score of each sample and the overall satisfaction label of each sample, the prediction accuracy of the score mapping model is determined. Each score mapping model can obtain a corresponding prediction accuracy. Since each original sample size corresponds to multiple score mapping models, multiple prediction accuracies can be obtained, and then the prediction accuracy mean and prediction accuracy standard deviation corresponding to the original sample size can be calculated based on the multiple prediction accuracies corresponding to the original sample size.
[0139] In a possible implementation, the model stability parameters also include the standard deviation of individual scores; based on the influencing factor scores included in the multiple score mapping models corresponding to each original sample size, the method for determining the model stability parameters corresponding to each original sample size may be: for any original sample size, based on the influencing factor scores for the same group in the multiple score mapping models corresponding to the original sample size, determine the standard deviation of the individual scores corresponding to the same group of the original sample size.
[0140] In this embodiment, for the same group, the same group is the same group corresponding to the same influencing factor, different score mapping models have different influencing factor scores for the same group, and the standard deviation of the influencing factor scores of the same group corresponding to multiple different score mapping models of the same original sample size is calculated to obtain the standard deviation of the single score of the original sample size corresponding to the same group. Through this method, the standard deviation of the single score of different groups corresponding to different original sample sizes can be obtained.
[0141] Figure 5 is a flow chart of a method for determining a target sample size according to an exemplary embodiment. Figure 5 As shown, in a possible implementation, determining the original sample size with the smallest sample size and the model stability parameter satisfying the stability condition among multiple original sample sizes as the target sample size may include the following steps:
[0142] In step S501, original sample sizes whose standard deviations of all single-item scores are less than a first target standard deviation are determined among a plurality of original sample sizes to obtain a first sample size set.
[0143] In step S502, original sample sizes whose average prediction accuracy is greater than a target accuracy threshold are determined among multiple original sample sizes to obtain a second sample size set.
[0144] In step S503, original sample sizes whose prediction accuracy standard deviation is less than the second target standard deviation are determined among the multiple original sample sizes to obtain a third sample size set.
[0145] In step S504, the intersection of the first sample size set, the second sample size set and the third sample size set is determined to obtain a fourth sample size set.
[0146] In step S505, the original sample size with the smallest sample size in the fourth sample size set is determined as the target sample size.
[0147] In this embodiment, the stability condition can be satisfied when the standard deviation of all individual scores is less than the first target standard deviation, the mean of the prediction accuracy is greater than the target accuracy threshold, and the standard deviation of the prediction accuracy is less than the second target standard deviation. Through the stability condition, a fourth sample size set that satisfies the stability condition can be obtained, thereby ensuring that a relatively stable and accurate score mapping model is established through samples of any sample size in the fourth sample size set. Then, the original sample size with the smallest sample size is selected as the target sample size, thereby minimizing the sample size to reduce operating costs.
[0148] Figure 6 is a block diagram of a sample size determination device according to an exemplary embodiment. Figure 6 The device 600 includes a first determination module 601, a second determination module 602 and a third determination module 603.
[0149] The first determination module 601 is configured to determine score mapping models corresponding to multiple original sample sizes, each of the original sample sizes corresponds to multiple score mapping models, and each of the score mapping models represents the impact factor scores of multiple impact factor satisfactions in different groups;
[0150] The second determination module 602 is configured to determine a model stability parameter corresponding to each original sample size according to a plurality of score mapping models corresponding to each original sample size;
[0151] The third determination module 603 is configured to determine the original sample size whose model stability parameter meets the stability condition and whose sample size is the smallest among the multiple original sample sizes as the target sample size.
[0152] Optionally, the first determining module 601 includes:
[0153] An acquisition submodule is configured to acquire a basic sample, the multiple original sample sizes, and the number of repeated samplings corresponding to each original sample size;
[0154] The first acquisition submodule is configured to repeatedly sample the basic sample according to the number of repeated samplings corresponding to each original sample size, so as to obtain multiple groups of sampled samples corresponding to each original sample size;
[0155] The second obtaining submodule is configured to establish a score mapping model according to each group of sampling samples corresponding to each original sample size, so as to obtain the score mapping models corresponding to the multiple original sample sizes.
[0156] Optionally, the second obtaining submodule includes:
[0157] The training subunit is configured to perform multiple rounds of training on the basic network for any group of sampling samples corresponding to any original sample size, according to the overall satisfaction label corresponding to each sampling sample in the group of sampling samples and the evidence weight values of multiple influencing factor satisfaction under different original sample groupings, so as to obtain the overall satisfaction prediction model corresponding to the group of sampling samples;
[0158] The obtaining subunit is configured to perform score mapping on the overall satisfaction prediction model corresponding to the group of sampling samples to obtain the score mapping model corresponding to the group of sampling samples.
[0159] Optionally, the model stability parameters include a prediction accuracy mean and a prediction accuracy standard deviation;
[0160] The second determining module 602 includes:
[0161] The first determination submodule is configured to determine, for any score mapping model corresponding to any original sample size, an overall score of each sampling sample corresponding to the score mapping model according to multiple impact factor scores corresponding to the score mapping model;
[0162] A second determination submodule is configured to determine the prediction accuracy of the score mapping model according to the overall score of each sampled sample corresponding to the score mapping model and the overall satisfaction label corresponding to each sampled sample;
[0163] The third obtaining submodule is configured to obtain the prediction accuracy mean and the prediction accuracy standard deviation corresponding to each original sample size according to the prediction accuracy of multiple score mapping models corresponding to each original sample size.
[0164] Optionally, the model stability parameter also includes a single item score standard deviation;
[0165] The second determining module 602 includes:
[0166] The third determination submodule is configured to determine, for any original sample size, the standard deviation of the single item scores of the original sample size corresponding to the same group according to the impact factor scores for the same group in multiple score mapping models corresponding to the original sample size.
[0167] Optionally, the third determining module 603 includes:
[0168] A fourth determination submodule is configured to determine the original sample sizes whose standard deviations of all single-item scores are less than the first target standard deviation among the multiple original sample sizes, to obtain a first sample size set;
[0169] A fifth determination submodule is configured to determine the original sample size whose prediction accuracy mean is greater than the target accuracy threshold among the multiple original sample sizes, to obtain a second sample size set;
[0170] A sixth determination submodule is configured to determine the original sample size whose prediction accuracy standard deviation is less than the second target standard deviation among the multiple original sample sizes, to obtain a third sample size set;
[0171] a seventh determination submodule, configured to determine an intersection of the first sample size set, the second sample size set, and the third sample size set to obtain a fourth sample size set;
[0172] The eighth determination submodule is configured to determine the original sample size with the smallest sample size in the fourth sample size set as the target sample size.
[0173] Optionally, the sample includes an overall satisfaction label and an evidence weight value;
[0174] The device 600 further includes:
[0175] A fourth determination module is configured to determine the overall satisfaction of each sample in the basic sample and the influencing factor satisfaction of multiple influencing factors associated with the overall satisfaction;
[0176] A first obtaining module is configured to discretize the influencing factor satisfaction to obtain an original sample grouping of each sample with respect to each influencing factor;
[0177] A fifth determination module is configured to determine an overall satisfaction label for each sample in the basic sample according to a preset overall satisfaction threshold and the overall satisfaction of each sample;
[0178] The second obtaining module is configured to obtain the evidence weight values of multiple influencing factor satisfactions corresponding to each sample under different original sample groupings according to the overall satisfaction label of each sample.
[0179] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0180] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which implement the steps of the sample size determination method provided by the present disclosure when the program instructions are executed by a processor.
[0181] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above-mentioned sample size determination method when executed by the programmable device.
[0182] Figure 7 700 is a block diagram of a device for determining a sample size according to an exemplary embodiment. For example, the device 700 may be provided as a server. Figure 7 The apparatus 700 includes a processing component 722, which further includes one or more processors, and a memory resource represented by a memory 732 for storing instructions, such as an application, that can be executed by the processing component 722. The application stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform the above-mentioned sample size determination method.
[0183] The device 700 may also include a power supply component 726 configured to perform power management of the device 700, a wired or wireless network interface 750 configured to connect the device 700 to a network, and an input / output interface 758. The device 700 may operate based on an operating system stored in the memory 732, such as Windows Server 2000. TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or similar.
[0184] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0185] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for determining sample size, characterized in that: include: Determine score mapping models corresponding to multiple original sample sizes, each of the original sample sizes corresponds to multiple score mapping models, and each of the score mapping models represents the impact factor scores of multiple impact factor satisfactions under different groups; Determine a model stability parameter corresponding to each original sample size according to a plurality of score mapping models corresponding to each original sample size; The original sample size whose model stability parameter satisfies the stability condition and whose sample size is the smallest among the multiple original sample sizes is determined as the target sample size.
2. The method for determining the sample size according to claim 1, characterized in that: The step of determining the score mapping models corresponding to the multiple original sample sizes includes: Obtaining a basic sample, the multiple original sample sizes, and the number of repeated samplings corresponding to each original sample size; Repeatedly sampling the basic sample according to the number of repeated samplings corresponding to each original sample size to obtain multiple groups of sampling samples corresponding to each original sample size; A score mapping model is established according to each group of sampling samples corresponding to each original sample size, so as to obtain the score mapping models corresponding to the multiple original sample sizes.
3. The method for determining the sample size according to claim 2, characterized in that: The step of establishing a score mapping model according to each group of sampling samples corresponding to each original sample size includes: For any group of sampling samples corresponding to any original sample size, according to the overall satisfaction label corresponding to each sampling sample in the group and the evidence weight values of multiple influencing factor satisfaction under different original sample groupings, the basic network is trained for multiple rounds to obtain the overall satisfaction prediction model corresponding to the group of sampling samples; The overall satisfaction prediction model corresponding to the group of sampling samples is score mapped to obtain the score mapping model corresponding to the group of sampling samples.
4. The method for determining the sample size according to claim 2, characterized in that: The model stability parameters include the prediction accuracy mean and the prediction accuracy standard deviation; The determining of the model stability parameter corresponding to each original sample size according to the impact factor scores included in the multiple score mapping models corresponding to each original sample size includes: For any score mapping model corresponding to any original sample size, determine the overall score of each sampling sample corresponding to the score mapping model according to the multiple impact factor scores corresponding to the score mapping model; Determine the prediction accuracy of the score mapping model according to the overall score of each sample corresponding to the score mapping model and the overall satisfaction label corresponding to each sample; According to the prediction accuracies of the multiple score mapping models corresponding to each original sample size, the prediction accuracy mean and the prediction accuracy standard deviation corresponding to each original sample size are obtained.
5. The method for determining the sample size according to claim 4, characterized in that: The model stability parameters also include the standard deviation of individual item scores; The step of determining the model stability parameter corresponding to each original sample size according to the impact factor scores included in the multiple score mapping models corresponding to each original sample size includes: For any original sample size, the standard deviation of the single item score corresponding to the same group of the original sample size is determined according to the impact factor scores for the same group in multiple score mapping models corresponding to the original sample size.
6. The method for determining the sample size according to claim 5, characterized in that: The step of determining the original sample size whose model stability parameter satisfies the stability condition and whose sample size is the smallest among the multiple original sample sizes as the target sample size includes: Determine the original sample sizes whose standard deviations of all single-item scores are less than the first target standard deviation among the multiple original sample sizes, and obtain a first sample size set; Determine the original sample size whose average prediction accuracy is greater than the target accuracy threshold among the multiple original sample sizes to obtain a second sample size set; Determine the original sample size whose prediction accuracy standard deviation is less than the second target standard deviation among the multiple original sample sizes, and obtain a third sample size set; Determine the intersection of the first sample size set, the second sample size set, and the third sample size set to obtain a fourth sample size set; The original sample size with the smallest sample size in the fourth sample size set is determined as the target sample size.
7. The method for determining the sample size according to any one of claims 2 to 6, characterized in that: The sampling sample includes an overall satisfaction label and an evidence weight value; Before repeatedly sampling the basic sample according to the number of repeated samplings corresponding to each original sample size to obtain multiple groups of sampled samples corresponding to each original sample size, the method further includes: Determine the overall satisfaction of each sample in the basic sample and the influence factor satisfaction of a plurality of influence factors associated with the overall satisfaction; Discretizing the satisfaction of the impact factor to obtain the original sample grouping of each sample with respect to each impact factor; Determine the overall satisfaction label of each sample in the basic sample according to the preset overall satisfaction threshold and the overall satisfaction of each sample; According to the overall satisfaction label of each sample, the evidence weight values of multiple influencing factor satisfactions corresponding to each sample under different original sample groupings are obtained.
8. A sample size determination device, characterized in that: include: A first determination module is configured to determine score mapping models corresponding to a plurality of original sample sizes, each of the original sample sizes corresponds to a plurality of score mapping models, and each of the score mapping models represents the impact factor scores of a plurality of impact factor satisfactions in different groups; A second determination module is configured to determine a model stability parameter corresponding to each original sample size according to a plurality of score mapping models corresponding to each original sample size; The third determination module is configured to determine the original sample size whose model stability parameter meets the stability condition and whose sample size is the smallest among the multiple original sample sizes as the target sample size.
9. A sample size determination device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the steps of the sample size determination method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the sample size determination method described in any one of claims 1 to 7 are implemented.