CN116993021A - Weight adjustment method and device for data characteristics, electronic equipment and medium - Google Patents

Weight adjustment method and device for data characteristics, electronic equipment and medium Download PDF

Info

Publication number
CN116993021A
CN116993021A CN202311000796.6A CN202311000796A CN116993021A CN 116993021 A CN116993021 A CN 116993021A CN 202311000796 A CN202311000796 A CN 202311000796A CN 116993021 A CN116993021 A CN 116993021A
Authority
CN
China
Prior art keywords
data
predicted
weight
prediction model
result
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
Application number
CN202311000796.6A
Other languages
Chinese (zh)
Inventor
梁翰哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202311000796.6A priority Critical patent/CN116993021A/en
Publication of CN116993021A publication Critical patent/CN116993021A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Operations Research (AREA)
  • Data Mining & Analysis (AREA)
  • Tourism & Hospitality (AREA)
  • Game Theory and Decision Science (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method, a device, electronic equipment and a medium for adjusting the weight of a data feature, wherein the method comprises the following steps: the data to be predicted comprises characteristic values corresponding to the data characteristics; inputting the feature values corresponding to the data features into a prediction model to obtain a prediction service result of the data to be predicted within a preset time length; after a preset time length, acquiring an actual service result of the data to be predicted; and if the predicted business result of the data to be predicted is inconsistent with the actual business result, adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result. When the predicted service result of the data to be predicted is inconsistent with the actual service result of the data to be predicted through the prediction model, the weight of each data characteristic in the prediction model is adjusted according to the data to be predicted, the historical data and the corresponding actual service result respectively, and the weight adjustment efficiency of the data characteristic is improved.

Description

Weight adjustment method and device for data characteristics, electronic equipment and medium
Technical Field
The method relates to the technical field of computer application, in particular to a method, a device, electronic equipment and a medium for adjusting the weight of data characteristics.
Background
With the development of technology, more and more people begin to predict future development directions through prediction models. However, for some external reasons, the accuracy of the prediction model may be reduced, and the weight of each data feature in the prediction model needs to be adjusted to improve the accuracy of the prediction model. Currently, the weight of each data feature in the prediction model is generally adjusted by a worker according to past experience.
However, since the above adjustment method has subjectivity of a worker, it is necessary to determine whether the accuracy of the adjusted prediction model reaches a threshold, and if the accuracy does not reach the threshold, it is necessary to adjust again, and thus the weight adjustment efficiency of the data feature is not high.
Disclosure of Invention
Accordingly, an object of the present application is to provide a method, an apparatus, an electronic device, and a medium for adjusting the weight of a data feature, which can adjust the weight of the data feature, thereby improving the weight adjustment efficiency of the data feature.
In a first aspect, an embodiment of the present application provides a device for adjusting a weight of a data feature, where the method includes:
obtaining data to be predicted, historical data and an actual service result corresponding to the historical data of a target service; the data to be predicted comprises characteristic values corresponding to the data characteristics;
inputting the feature values corresponding to the data features into a prediction model to obtain a prediction service result of the data to be predicted within a preset time length;
the prediction model is obtained through training historical data and corresponding actual business results;
after a preset time length, acquiring an actual service result of the data to be predicted;
and if the predicted business result of the data to be predicted is inconsistent with the actual business result, adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result.
In one possible implementation manner, the adjusting the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result includes:
taking the historical data and the data to be predicted as sample data, taking actual service results corresponding to the historical data and the data to be predicted respectively as labels, and carrying out model training on a prediction model;
and taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
In one possible embodiment, the method further comprises:
calculating a change value between the pre-adjustment weight and the post-adjustment weight of the data feature;
if the change value is smaller than the preset threshold value, the adjusted weight is determined to be the final weight of the data characteristic.
In one possible implementation manner, before adjusting the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result, the method further includes:
judging whether the quantity of the data to be predicted is larger than a preset quantity or not;
if the number of the data to be predicted is greater than the preset number, jumping to adjust the weight of each data characteristic in the prediction model according to the historical data, the corresponding actual service result, the data to be predicted and the corresponding actual service result so as to continue execution;
if the number of the data to be predicted is smaller than or equal to the preset number, jumping to obtain the data to be predicted, the historical data of the target service and the actual service result corresponding to the historical data so as to continue execution.
In one possible implementation, if the prediction model is a regression model, the principle formula of the prediction model includes:
wherein X is data to be predicted, p (X) is probability that predicted business result of the data to be predicted is preset business result, and beta 0 For the preset intercept, j is the number of data features in the data to be predicted, β i Is the weight, x, of the ith data feature in the data to be predicted i And the characteristic value corresponding to the ith data characteristic in the data to be predicted.
In a second aspect, an embodiment of the present application further provides a device for adjusting a weight of a data feature, where the device includes:
the acquisition module is used for acquiring data to be predicted, historical data and actual service results corresponding to the historical data of the target service; the data to be predicted comprises characteristic values corresponding to the data characteristics;
the input module is used for inputting the characteristic values corresponding to the data characteristics into the prediction model to obtain a prediction service result of the data to be predicted within a preset time length;
the prediction model is obtained through training historical data and corresponding actual business results;
the acquisition module is also used for acquiring an actual service result of the data to be predicted after the preset time length;
and the adjustment module is used for adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result if the predicted service result of the data to be predicted is inconsistent with the actual service result.
In a possible implementation manner, the adjustment module is specifically configured to perform model training on the prediction model by using historical data and data to be predicted as sample data, and actual service results corresponding to the historical data and the data to be predicted respectively as labels; and taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
In one possible embodiment, the apparatus further comprises: the computing module and the determining module;
the calculation module is used for calculating a change value between the weight before adjustment and the weight after adjustment of the data characteristic;
and the determining module is used for determining the adjusted weight to be the final weight of the data characteristic if the change value is smaller than a preset threshold value.
In one possible embodiment, the apparatus further comprises: the judging module and the skipping module;
the judging module is used for judging whether the quantity of the data to be predicted is larger than a preset quantity;
the jump module is used for jumping to adjust the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result if the number of the data to be predicted is larger than the preset number so as to continue execution;
and the jump module is further used for jumping to obtain the data to be predicted, the historical data and the actual service result corresponding to the historical data of the target service to continue execution if the number of the data to be predicted is smaller than or equal to the preset number.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium in communication over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the weight adjustment method of any of the data features of the first aspect.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor performs the steps of the weight adjustment method of any of the data features of the first aspect.
The embodiment of the application provides a method, a device, electronic equipment and a medium for adjusting the weight of a data characteristic, wherein the method comprises the following steps: obtaining data to be predicted, historical data and an actual service result corresponding to the historical data of a target service; the data to be predicted comprises characteristic values corresponding to the data characteristics; inputting the feature values corresponding to the data features into a prediction model to obtain a prediction service result of the data to be predicted within a preset time length; the prediction model is obtained through training historical data and corresponding actual business results; after a preset time length, acquiring an actual service result of the data to be predicted; and if the predicted business result of the data to be predicted is inconsistent with the actual business result, adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result. When the predicted service result of the data to be predicted is inconsistent with the actual service result of the data to be predicted through the prediction model, the weight of each data characteristic in the prediction model is adjusted according to the data to be predicted, the historical data and the corresponding actual service result, so that the weight adjustment efficiency of the data characteristic is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for adjusting weights of data features according to an embodiment of the present application;
FIG. 2 is a flowchart of another method for weighting data features according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a weight adjustment device for data features according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
In order to enable one skilled in the art to make and use the present disclosure, the following embodiments are presented in connection with a particular application scenario "computer application technology". It will be apparent to those having ordinary skill in the art that the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the application. Although the application is described primarily in the context of "computer application technology," it should be appreciated that this is but one exemplary embodiment.
It should be noted that the term "comprising" will be used in embodiments of the application to indicate the presence of the features stated hereafter, but not to exclude the addition of other features.
The following describes a method for adjusting the weight of a data feature in detail.
Referring to fig. 1, a flow chart of a method for adjusting weights of data features according to an embodiment of the present application is shown, where a specific implementation process of the method for adjusting weights of data features is as follows:
s101, obtaining data to be predicted, historical data and actual service results corresponding to the historical data of a target service.
S102, inputting feature values corresponding to the data features into a prediction model to obtain a prediction service result of the data to be predicted within a preset time period.
S103, after a preset time length, acquiring an actual service result of the data to be predicted.
And S104, if the predicted business result of the data to be predicted is inconsistent with the actual business result, adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result.
The embodiment of the application provides a weight adjustment method of data characteristics, which comprises the following steps: obtaining data to be predicted, historical data and an actual service result corresponding to the historical data of a target service; the data to be predicted comprises characteristic values corresponding to the data characteristics; inputting the feature values corresponding to the data features into a prediction model to obtain a prediction service result of the data to be predicted within a preset time length; the prediction model is obtained through training historical data and corresponding actual business results; after a preset time length, acquiring an actual service result of the data to be predicted; and if the predicted business result of the data to be predicted is inconsistent with the actual business result, adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result. When the predicted service result of the data to be predicted is inconsistent with the actual service result of the data to be predicted through the prediction model, the weight of each data characteristic in the prediction model is adjusted according to the data to be predicted, the historical data and the corresponding actual service result, so that the weight adjustment efficiency of the data characteristic is improved.
Exemplary steps of embodiments of the present application are described below:
s101, obtaining data to be predicted, historical data and actual service results corresponding to the historical data of a target service.
In the embodiment of the application, the target service refers to a service which needs to be predicted according to the data and the weight of the data characteristics of the data; the target service may be to judge whether the user corresponding to the data needs to push, judge whether the data meets the requirement, and so on, specifically according to the actual situation. The data to be predicted refers to the data which needs to be predicted corresponding to the target service. The history data is data for which the business result in real life is known, i.e., the actual business result of the history data for the target business is known. For example, the target service is to judge whether the data meets the requirement, and the data is found to meet the requirement after being examined in real life, and then the actual service result of the data meets the requirement. In addition, the data to be predicted and the historical data contain values corresponding to all data features of the service result for predicting the target service.
Wherein each data to be predicted corresponds to one or more data features; the data to be predicted comprises characteristic values corresponding to the data characteristics. The historical data can be structured data, semi-structured data or unstructured data, and in the process of selecting the historical data, factors such as quality, integrity and consistency of the historical data need to be considered so as to ensure the accuracy and reliability of the historical data.
S102, inputting feature values corresponding to the data features into a prediction model to obtain a prediction service result of the data to be predicted within a preset time period.
In the embodiment of the application, the service result prediction model for predicting the target service by the prediction model is obtained through training the historical data and the corresponding actual service result in the S101. Because the values of the data features corresponding to the user change, the predicted business result of the predicted data can only be used for representing the predicted business result of the user within the preset duration. The preset duration refers to the duration that the predicted service result corresponding to the data to be predicted can be used for representing the service result of the target service of the user corresponding to the data to be predicted.
The prediction model may be a regression model, a random forest algorithm model, etc., which is specific to the actual situation. Specifically, the training process of the prediction model includes: acquiring the weight of each data characteristic of preset historical data input by a user; taking the weight of each data characteristic of the preset historical data as the weight of each data characteristic in the prediction model; inputting the historical data into a current prediction model to obtain a prediction service result corresponding to the historical data; determining the accuracy of a prediction model according to a prediction service result and an actual service result corresponding to the historical data; if the accuracy is smaller than the preset accuracy, updating the prediction model according to the prediction service result and the actual service result corresponding to the historical data; the method comprises the steps of inputting historical data into a current prediction model to obtain a prediction service result corresponding to the historical data; otherwise, the current prediction model is taken as a final prediction model.
Further, determining the accuracy of the prediction model according to the predicted service result and the actual service result corresponding to the historical data includes: counting the probability that the predicted service result corresponding to the historical data is consistent with the actual service result; and determining the probability that the predicted service result corresponding to the historical data is consistent with the actual service result as the accuracy of the prediction model.
If the prediction model is a regression model, the principle formula of the prediction model includes:
wherein X is data to be predicted, p (X) is probability that predicted business result of the data to be predicted is preset business result, and beta 0 For the preset intercept, j is the number of data features in the data to be predicted, β i Is the weight, x, of the ith data feature in the data to be predicted i And the characteristic value corresponding to the ith data characteristic in the data to be predicted.
Here, if the target service is to determine whether the data meets the requirement, and the preset service result preset by the user is the requirement, p (X) is the probability that the predicted service result of the data to be predicted is the requirement.
Further, the probability corresponding to the predicted business result of the data to be predicted is sent to the user.
S103, after a preset time length, acquiring an actual service result of the data to be predicted.
In the embodiment of the application, after the preset time period is elapsed, the fact that the actual service result in the preset time period after the user corresponding to the data to be predicted predicts the service result is obtained is explained, so that the actual service result of the data to be predicted needs to be obtained after the preset time period.
And S104, if the predicted business result of the data to be predicted is inconsistent with the actual business result, adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result.
In the embodiment of the application, if the predicted service result of the data to be predicted is inconsistent with the actual service result, the predicted service result of the data to be predicted by the prediction model is inaccurate, so that the weight of each data characteristic in the prediction model needs to be adjusted; specifically, the weight of each data characteristic in the prediction model is adjusted through historical data and corresponding actual service results, data to be predicted and corresponding actual service results.
Optionally, before adjusting the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result, the method further includes: judging whether the quantity of the data to be predicted is larger than a preset quantity or not; if the number of the data to be predicted is greater than the preset number, jumping to adjust the weight of each data characteristic in the prediction model according to the historical data, the corresponding actual service result, the data to be predicted and the corresponding actual service result so as to continue execution; if the number of the data to be predicted is smaller than or equal to the preset number, jumping to obtain the data to be predicted, the historical data of the target service and the actual service result corresponding to the historical data so as to continue execution.
In the embodiment of the application, if the quantity of the data to be predicted, which is inconsistent with the predicted service result and the actual service result, is larger than the preset quantity, jumping to adjust the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result so as to continue execution; if the quantity of the data to be predicted, which is inconsistent with the predicted service result and the actual service result, is smaller than or equal to the preset quantity, jumping to obtain the data to be predicted, the historical data and the actual service result corresponding to the historical data of the target service, so as to continuously obtain the data to be predicted, and adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result when the quantity of the data to be predicted, which is inconsistent with the predicted service result and the actual service result, is larger than the preset quantity.
Here, when a very small amount of data to be predicted, of which the actual service result is inconsistent with the predicted service result, is generated, the prediction model still meets the requirements, and at this time, the weight of each data feature in the prediction model is not required to be adjusted. Moreover, since the weights of the data features in the prediction model are complex, if the data to be predicted, of which the actual service result is inconsistent with the predicted service result, is generated, the working efficiency of the prediction model is reduced by adjusting the weights of the data features in the prediction model; therefore, the weight of each data characteristic in the prediction model is not adjusted until the quantity of the data to be predicted, which is inconsistent with the predicted service result and the actual service result, is larger than the preset quantity.
Specifically, according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result, the weight of each data feature in the prediction model is adjusted, including: taking the historical data and the data to be predicted as sample data, taking actual service results corresponding to the historical data and the data to be predicted respectively as labels, and carrying out model training on a prediction model; and taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
In the embodiment of the application, the data to be predicted is also used as sample data of a prediction model, so as to carry out model training on the prediction model; and further taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
Optionally, calculating a change value between the pre-adjustment weight and the post-adjustment weight of the data feature; if the change value is smaller than the preset threshold value, the adjusted weight is determined to be the final weight of the data characteristic.
Referring to fig. 2, a flowchart of another method for adjusting the weight of a data feature according to an embodiment of the present application is shown, and the repetition of steps S201 to S206 and steps S102 to S104 is not repeated, and specifically, referring to steps S102 to S104, the following description will explain exemplary steps of the embodiment of the present application:
s201, obtaining data to be predicted, historical data of a target service and an actual service result corresponding to the historical data.
The data to be predicted comprises characteristic values corresponding to the data characteristics;
s202, inputting feature values corresponding to the data features into a prediction model to obtain a prediction service result of the data to be predicted within a preset time period.
Here, if the prediction model is a regression model, the principle formula of the prediction model includes:
wherein X is data to be predicted, p (X) is probability that predicted business result of the data to be predicted is preset business result, and beta 0 For the preset intercept, j is the number of data features in the data to be predicted, β i Is the weight, x, of the ith data feature in the data to be predicted i And the characteristic value corresponding to the ith data characteristic in the data to be predicted.
The prediction model is obtained through training historical data and corresponding actual business results;
s203, after a preset time length, acquiring an actual service result of the data to be predicted.
S204, if the predicted business result of the data to be predicted is inconsistent with the actual business result, the weight of each data characteristic in the prediction model is adjusted according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result.
Specifically, according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result, the weight of each data feature in the prediction model is adjusted, including: taking the historical data and the data to be predicted as sample data, taking actual service results corresponding to the historical data and the data to be predicted respectively as labels, and carrying out model training on a prediction model; and taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
S205, calculating a change value between the weight before adjustment and the weight after adjustment of the data characteristic.
In an embodiment of the application, the variation value is used to characterize the degree of adjustment of the data feature. Calculating a change value between the pre-adjustment weight and the post-adjustment weight of the data feature by:
I. determining the absolute value of the difference value between the weight before adjustment and the weight after adjustment corresponding to each data feature as the change value of each data feature;
determining the maximum value in all the variation values as the final variation value of the data characteristic; or an average of all the variation values, to determine the final variation value for the data feature.
S206, if the change value is smaller than a preset threshold value, determining the adjusted weight to be the final weight of the data characteristic.
In the embodiment of the application, if the variation value is smaller than the preset threshold value, the adjustment degree of the data feature is in a receivable range, so that the adjusted weight is determined as the final weight of the data feature.
Optionally, if the variation value is greater than the preset threshold, the adjustment degree of the data characteristic is larger, and is likely to be caused by data abnormality or model parameter abnormality, so that an abnormality alarm is sent to the user.
The application provides another method for adjusting the weight of a data feature, which is used for determining the adjusted weight as the final weight of the data feature when the change value between the weight before adjustment and the weight after adjustment of the data feature is smaller than a preset threshold value, so that the accuracy of adjusting the weight of the data feature is improved.
Based on the same inventive concept, the embodiment of the present application further provides a data feature weight adjustment device corresponding to the data feature weight adjustment method, and since the principle of the device solution problem in the embodiment of the present application is similar to that of the data feature weight adjustment method in the embodiment of the present application, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, a schematic diagram of a device for adjusting weight of a data feature according to an embodiment of the present application is shown, where the device includes:
the acquiring module 301 is configured to acquire data to be predicted, historical data, and an actual service result corresponding to the historical data of the target service; the data to be predicted comprises characteristic values corresponding to the data characteristics;
the input module 302 is configured to input feature values corresponding to the features of each data into the prediction model, so as to obtain a predicted service result of the data to be predicted within a preset duration;
the prediction model is obtained through training historical data and corresponding actual business results;
the obtaining module 301 is further configured to obtain an actual service result of the data to be predicted after the preset duration;
the adjustment module 303 is configured to adjust the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted, and the corresponding actual service result if the predicted service result of the data to be predicted is inconsistent with the actual service result.
In a possible implementation manner, the adjustment module 303 is specifically configured to perform model training on the prediction model by using, as sample data, historical data and data to be predicted, and using, as labels, actual service results corresponding to the historical data and the data to be predicted, respectively; and taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
In one possible embodiment, the apparatus further comprises: a calculation module 304, a determination module 305;
a calculation module 304, configured to calculate a change value between the pre-adjustment weight and the post-adjustment weight of each data feature;
and the determining module 305 is configured to determine the adjusted weight as the final weight of each data feature if the variation value is smaller than the preset threshold value.
In one possible embodiment, the apparatus further comprises: a judgment module 306, a jump module 307;
a judging module 306, configured to judge whether the number of data to be predicted is greater than a preset number;
a skip module 307, configured to skip to adjust the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result if the number of the data to be predicted is greater than the preset number, so as to continue execution;
the skip module 307 is further configured to skip to obtain the data to be predicted, the history data, and the actual service result corresponding to the history data of the target service if the number of the data to be predicted is less than or equal to the preset number, so as to continue execution.
The embodiment of the application provides a weight adjusting device for data characteristics, which comprises the following components: the acquiring module 301 is configured to acquire data to be predicted, historical data, and an actual service result corresponding to the historical data of the target service; the data to be predicted comprises characteristic values corresponding to the data characteristics; the input module 302 is configured to input feature values corresponding to the features of each data into the prediction model, so as to obtain a predicted service result of the data to be predicted within a preset duration; the prediction model is obtained through training historical data and corresponding actual business results; the obtaining module 301 is further configured to obtain an actual service result of the data to be predicted after the preset duration; the adjustment module 303 is configured to adjust the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted, and the corresponding actual service result if the predicted service result of the data to be predicted is inconsistent with the actual service result. When the predicted service result of the data to be predicted is inconsistent with the actual service result of the data to be predicted through the prediction model, the weight of each data characteristic in the prediction model is adjusted according to the data to be predicted, the historical data and the corresponding actual service result, so that the weight adjustment efficiency of the data characteristic is improved.
As shown in fig. 4, an electronic device 400 provided in an embodiment of the present application includes: the electronic device comprises a processor 401, a memory 402 and a bus, wherein the memory 402 stores machine readable instructions executable by the processor 401, and when the electronic device is running, the processor 401 communicates with the memory 402 through the bus, and the processor 401 executes the machine readable instructions to execute the steps of the weight adjustment method of the data characteristics.
Specifically, the memory 402 and the processor 401 can be general-purpose memories and processors, and are not limited herein, and the method for adjusting the weight of the data features can be performed when the processor 401 runs a computer program stored in the memory 402.
The embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program executes the steps of the method for adjusting the weight of the data features when being executed by a processor.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the method embodiments, and are not repeated in the present disclosure. In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, and for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other form.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the information processing method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A method for weighting data features, the method comprising:
obtaining data to be predicted and historical data of a target service and an actual service result corresponding to the historical data; the data to be predicted comprises characteristic values corresponding to the data characteristics;
inputting the characteristic values corresponding to the data characteristics into a prediction model to obtain a prediction service result of the data to be predicted within a preset time length;
the prediction model is obtained through training of the historical data and corresponding actual business results;
after the preset time length, acquiring an actual business result of the data to be predicted;
and if the predicted business result and the actual business result of the data to be predicted are inconsistent, adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual business result, the data to be predicted and the corresponding actual business result.
2. The method for adjusting the weight of the data features according to claim 1, wherein the adjusting the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result comprises:
taking the historical data and the data to be predicted as sample data, taking actual service results corresponding to the historical data and the data to be predicted respectively as labels, and performing model training on the prediction model;
and taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
3. The method of weighting data features of claim 2, further comprising:
calculating a change value between the pre-adjustment weight and the post-adjustment weight of the data feature;
and if the change value is smaller than a preset threshold value, determining the adjusted weight to be the final weight of the data characteristic.
4. A method for adjusting the weight of data features according to any one of claims 1 to 3, wherein before the adjusting the weight of each data feature in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result, the method further comprises:
judging whether the quantity of the data to be predicted is larger than a preset quantity or not;
if the number of the data to be predicted is larger than the preset number, jumping to the step of adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result so as to continue execution;
if the number of the data to be predicted is smaller than or equal to the preset number, jumping to the data to be predicted, the historical data and the actual service result corresponding to the historical data of the acquired target service to continue execution.
5. The method of claim 4, wherein if the prediction model is a regression model, the principle formula of the prediction model includes:
wherein X is data to be predicted, p (X) is probability that predicted business result of the data to be predicted is preset business result, and beta 0 For the preset intercept, j is the number of data features in the data to be predicted, β i Is the weight, x, of the ith data feature in the data to be predicted i And the characteristic value corresponding to the ith data characteristic in the data to be predicted.
6. A weight adjustment device for a data feature, the device comprising:
the acquisition module is used for acquiring data to be predicted and historical data of the target service and an actual service result corresponding to the historical data; the data to be predicted comprises characteristic values corresponding to the data characteristics;
the input module is used for inputting the characteristic values corresponding to the data characteristics into the prediction model to obtain a prediction service result of the data to be predicted within a preset duration;
the prediction model is obtained through training of the historical data and corresponding actual business results;
the acquisition module is further used for acquiring an actual service result of the data to be predicted after the preset time length;
and the adjustment module is used for adjusting the weight of each data characteristic in the prediction model according to the historical data and the corresponding actual service result, the data to be predicted and the corresponding actual service result if the predicted service result of the data to be predicted is inconsistent with the actual service result.
7. The device for adjusting the weight of a data feature according to claim 6, wherein the adjusting module is specifically configured to:
taking the historical data and the data to be predicted as sample data, taking actual service results corresponding to the historical data and the data to be predicted respectively as labels, and performing model training on the prediction model;
and taking the weight of each data characteristic in the trained prediction model as the weight of each data characteristic after adjustment.
8. The apparatus for weighting data features according to claim 7, further comprising: the computing module and the determining module;
the calculation module is used for calculating a change value between the weight before adjustment and the weight after adjustment of the data characteristic;
and the determining module is used for determining the adjusted weight to be the final weight of the data characteristic if the change value is smaller than a preset threshold value.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the method of weighting data features according to any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, performs the steps of the method for weighting data features according to any of claims 1 to 5.
CN202311000796.6A 2023-08-09 2023-08-09 Weight adjustment method and device for data characteristics, electronic equipment and medium Pending CN116993021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311000796.6A CN116993021A (en) 2023-08-09 2023-08-09 Weight adjustment method and device for data characteristics, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311000796.6A CN116993021A (en) 2023-08-09 2023-08-09 Weight adjustment method and device for data characteristics, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN116993021A true CN116993021A (en) 2023-11-03

Family

ID=88529964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311000796.6A Pending CN116993021A (en) 2023-08-09 2023-08-09 Weight adjustment method and device for data characteristics, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116993021A (en)

Similar Documents

Publication Publication Date Title
CN108959934B (en) Security risk assessment method, security risk assessment device, computer equipment and storage medium
CN111314173B (en) Monitoring information abnormity positioning method and device, computer equipment and storage medium
US20210048811A1 (en) Model generation device for life prediction, model generation method for life prediction, and recording medium storing model generation program for life prediction
CN109992473B (en) Application system monitoring method, device, equipment and storage medium
CN110188862B (en) Searching method, device and system for model hyper-parameters for data processing
CN111881023B (en) Software aging prediction method and device based on multi-model comparison
CN112907128A (en) Data analysis method, device, equipment and medium based on AB test result
CN111025041A (en) Electric vehicle charging pile monitoring method and system, computer equipment and medium
CN116307215A (en) Load prediction method, device, equipment and storage medium of power system
CN113626734B (en) User behavior guiding method and device, electronic equipment and storage medium
CN113158435B (en) Complex system simulation running time prediction method and device based on ensemble learning
CN107480703B (en) Transaction fault detection method and device
CN114003475A (en) Software product maturity evaluation method and device, computer equipment and storage medium
CN109800975B (en) Resource evaluation method and device, computer equipment and storage medium
CN113780666B (en) Missing value prediction method and device and readable storage medium
CN111783883A (en) Abnormal data detection method and device
CN116993021A (en) Weight adjustment method and device for data characteristics, electronic equipment and medium
CN116011677A (en) Time sequence data prediction method and device, electronic equipment and storage medium
CN112669091B (en) Data processing method, device and storage medium
CN115544803A (en) Method, device, equipment and storage medium for predicting residual life of transformer
CN106156470B (en) Time series abnormity detection and labeling method and system
CN114760190A (en) Service-oriented converged network performance anomaly detection method
CN110083517B (en) User image confidence optimization method and device
CN109059989B (en) Method, system and equipment for evaluating remaining life of instrument
CN111967774A (en) Software quality risk prediction 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