WO2019114423A1 - Method and apparatus for merging model prediction values, and device - Google Patents
Method and apparatus for merging model prediction values, and device Download PDFInfo
- Publication number
- WO2019114423A1 WO2019114423A1 PCT/CN2018/111824 CN2018111824W WO2019114423A1 WO 2019114423 A1 WO2019114423 A1 WO 2019114423A1 CN 2018111824 W CN2018111824 W CN 2018111824W WO 2019114423 A1 WO2019114423 A1 WO 2019114423A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- predicted value
- interval
- prediction model
- model
- sample
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/251—Fusion techniques of input or preprocessed data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
Definitions
- the present specification relates to the field of machine learning technology, and in particular, to a method, device and device for fusing a model prediction value.
- Machine learning algorithms are a class of algorithms that can automatically analyze and obtain rules from data and use rules to predict unknown data. They are widely used in many fields.
- offline prediction models are usually implemented with timing tasks.
- the advantage is that they can incorporate higher-dimensional features and use more complex algorithms to achieve more accurate predictions.
- the effect due to the large number of features and the complexity of the algorithm, the prediction process is usually time consuming.
- online prediction models can use more dimensional features and simpler algorithms to achieve more efficient predictions.
- the disadvantage is that the features are not rich enough and the accuracy is not high. It can be seen that the online prediction model and the offline prediction model each have their own advantages, and how to properly integrate the two is an urgent problem to be solved in the industry.
- the embodiment of the present specification provides a method, device and device for fusing a model prediction value, and the technical solution is as follows:
- a method for fusing a model predictor includes:
- each of the plurality of samples includes: a first predicted value a second predicted value and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
- the transformed first sample feature, the second interval feature, and the sample tag of each sample constitute transformed sample data, and the transformed sample data is used to train the model, and the trained completed model is used for online
- the predicted value of the prediction model is combined with the predicted value of the offline prediction model to obtain a final predicted value.
- a method for fusing a model predictor includes:
- an apparatus for fusing a model predictor includes:
- a binning unit based on a given number of samples, binning the predicted value of the online predictive model and the predicted value of the offline predictive model according to a set binning method, wherein each of the plurality of samples comprises: a first predicted value, a second predicted value, and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
- the feature conversion unit converts the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located according to the result of the binning, and converts the second predicted value of each sample into the first predicted value a second interval feature corresponding to the interval in which the predicted value is located;
- a training unit that constructs the transformed sample data by using the first interval feature, the second interval feature, and the sample tag corresponding to each sample, and training the model by using the transformed sample data, and the trained model is used
- the predicted value of the online prediction model and the predicted value of the offline prediction model are combined to obtain a final predicted value.
- an apparatus for fusing a model predictor includes:
- the online score prediction unit acquires service data generated by the target user in a first time period before the trigger time, determines an input feature according to the service data, inputs the online input prediction model, and outputs a first predicted value, the online prediction model a label used to predict the user;
- An offline score obtaining unit obtains a second predicted value corresponding to the target user obtained by using an offline prediction model, wherein an input feature of the offline prediction model is generated according to the target user in a past second time period Determined by a service feature, the offline prediction model is used to predict a user's tag;
- the interval determining unit determines, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model in advance, respectively determining the first interval and the second predicted value at which the first predicted value is located Second interval;
- a score fusion unit that fuses the first predicted value and the second predicted value according to the first interval and the second interval to obtain a final fusion predicted value,
- the fusion prediction value is used to determine the label of the target user.
- a computer apparatus comprising:
- a memory for storing processor executable instructions
- the processor is configured to:
- each of the plurality of samples includes: a first predicted value a second predicted value and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
- the transformed first sample feature, the second interval feature, and the sample tag of each sample constitute transformed sample data, and the transformed sample data is used to train the model, and the trained completed model is used for online
- the predicted value of the prediction model is combined with the predicted value of the offline prediction model to obtain a final predicted value.
- a computer apparatus comprising:
- a memory for storing processor executable instructions
- the processor is configured to:
- the online score prediction unit acquires service data generated by the target user in a first time period before the trigger time, determines an input feature according to the service data, inputs the online input prediction model, and outputs a first predicted value, the online prediction model a label used to predict the user;
- An offline score obtaining unit obtains a second predicted value corresponding to the target user obtained by using an offline prediction model, wherein an input feature of the offline prediction model is generated according to the target user in a past second time period Determined by a service feature, the offline prediction model is used to predict a user's tag;
- the interval determining unit determines, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model in advance, respectively determining the first interval and the second predicted value at which the first predicted value is located Second interval;
- a score fusion unit that fuses the first predicted value and the second predicted value according to the first interval and the second interval to obtain a final fusion predicted value,
- the fusion prediction value is used to determine the label of the target user.
- the machine-learned model is used to fuse the predicted value of the line prediction model with the predicted value of the offline prediction model, and finally the score obtained by the fusion is used to predict the user's label, thereby improving the user's
- the accuracy of the predictions of the tags also meets the requirements of the business for low latency.
- any of the embodiments of the present specification does not need to achieve all of the above effects.
- FIG. 1 is a schematic flow chart of a method for fusing a model prediction value according to an embodiment of the present specification
- FIG. 3 is a schematic structural diagram of a device (weight training phase) for integrating model prediction values according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of a device (a score fusion phase) for fusing a model prediction value according to an embodiment of the present specification
- Figure 5 is a block diagram showing the structure of an apparatus for configuring an apparatus of an embodiment of the present specification.
- a method for fusing a model prediction value is used to fuse a score obtained by an online prediction model with a score obtained by an offline prediction model.
- the method can include the following steps 101-104, wherein:
- Step 101 Acquire service data generated by the target user in the first time period, determine an input feature according to the service data, input the online prediction model, and output a first predicted value.
- Step 102 Acquire a second prediction value corresponding to the target user obtained by using an offline prediction model, where an input feature of the offline prediction model is determined according to a service feature generated by the target user in a second time period. of.
- the online prediction model and the offline prediction model are models constructed by using a machine learning algorithm to predict a user's tags.
- the user tags that the two models need to predict may be related to specific services. For example, for a network payment service, the user tags required for prediction can be classified into: “high-risk users”, “medium risk users”, “ Low-risk users”, and so on. For an information recommendation service, the user tags required for prediction can be classified into: “sports class”, "education class”, “financial class”, and the like.
- Both the online prediction model and the offline prediction model are trained by using a certain number of training samples, and each of the training samples may include: a sample generated by the sample user in participating in a specific service (such as a network payment service). Or multiple behavioral data, as well as the label that the sample user is identified. The same batch of samples may be used to train the online prediction model and the offline prediction model, or two different samples may be used to train the online prediction model and the offline prediction model, which are not limited herein.
- the offline prediction model may be implemented by a timing task, such as: performing offline score prediction every day at a specified time or a specified time period, the prediction process may be for a full amount of users; and online prediction
- the model can be triggered by the operation of a specific user. For example, the behavior of a user clicking a web page can trigger a score calculation process of the online prediction model.
- the offline prediction model can obtain the service data (feature A) generated by each user in the process of participating in a specific service on the T-1 day, according to the obtained service.
- the data (feature A) is processed accordingly, and the input features can be obtained and input into the offline prediction model, and the offline prediction scores of each user (ie, the second predicted values in the text) are obtained and written into the database X.
- the online feature data (feature B) of the user can be continuously collected and written into the database Y, wherein the online feature data can be a quasi-real-time service generated by the user in the process of participating in a specific service.
- the data for example, the triggering time of the online prediction is t1, and the online feature data may be the business data generated during the period from t0 to t1 (eg, 3 minutes).
- the scheduler needs to perform two tasks, one of which is to read from the database X the second predicted value corresponding to the target user obtained by the offline prediction model calculation; The second is to read the online feature data of the target user from the database Y to perform the score prediction process of the next online prediction model.
- a predictive score can be obtained through the online predictive model, and a predicted score can be obtained through the offline predictive model.
- Step 103 Determine, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model, respectively, the first interval in which the first predicted value is located and the second predicted value Second interval.
- Step 104 merging the first predicted value and the second predicted value by using a pre-trained model according to the first interval and the second interval, to obtain a final fusion predicted value, where The fusion prediction value is used to determine the label of the target user.
- step 104 may specifically include:
- Step 1041 Obtain a first weight corresponding to the first interval and a second weight corresponding to the second interval, based on a predetermined weight corresponding to each interval obtained by the binning.
- the parameters to be trained of the model include weights corresponding to the intervals obtained by the binning.
- Step 1042 Determine, by using the first weight and the second weight, a fusion prediction value, where the fusion prediction value is used to determine a label of the target user.
- the method includes steps 201 to 203, where:
- Step 201 Bind the predicted value of the online prediction model and the predicted value of the offline prediction model according to a set binning method according to a given number of samples, wherein each sample of the plurality of samples includes: a predicted value, a second predicted value, and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model.
- the sample mentioned in the step 201 may be the same as the sample used to train the above-mentioned offline prediction model and/or the online prediction model. Of course, it may be a different sample, which is not limited thereto.
- the set binning method may be an entropy based binning method.
- the entropy-based binning method considers the value of the dependent variable when binning, so that the minimum entropy (minimumentropy) is achieved after binning.
- the benefit of the entropy-based binning method is the ability to show better discrimination in high score areas.
- the setting binning method may also be a Gini-based binning method, an equal-frequency binning method, or the like.
- Step 202 Convert, according to the result of the binning, the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located, and convert the second predicted value of each sample into the second predicted value.
- the second interval feature corresponding to the interval in which the predicted value is located.
- the obtained split points include: 0, 0.1, 0.13. , 0.15, 0.2, 0.3, 0.5, 1; after binning the predicted values of the offline prediction model, the obtained segmentation points include: 0, 0.03, 0.05, 0.08, 0.09, 0.11, 0.13, 1;
- the output values of the online prediction model and the offline prediction model are respectively obtained in 7 intervals after binning.
- the one-hot rule may be employed to implement the feature conversion of step 202.
- a sample has a first predicted value of 0.17 and a second predicted value of 0.12. Since 0.17 is in the 4th interval (0.15, 0.2) and 0.12 is in the 6th interval (0.11, 0.13), one-hot is used.
- the rule may convert the first predicted value: 0.17 into the first interval feature: on-bin-0001000 ("on-bin” is the identifier of the online prediction model), and convert the second predicted value: 0.12 into the second interval feature: off -bin-0000010 ("off-bin” is the identifier of the offline prediction model).
- feature conversion can be performed on the first predicted value and the second predicted value in one pair of other samples.
- Step 203 constituting the transformed sample data by using the first interval feature, the second interval feature, and the sample tag corresponding to each sample, and training the model by using the transformed sample data, and the trained model is used.
- the predicted value of the online prediction model and the predicted value of the offline prediction model are combined to obtain a final predicted value.
- the converted sample data may include other data in addition to the first interval feature, the second interval feature, and the label of the sample. That is, the "composition" is not closed.
- a piece of sample data is, for example:
- the new sample data obtained is, for example:
- the model to be trained in this paper may be a linear model or a nonlinear model.
- the parameters to be trained of the model may include weights corresponding to the intervals obtained by binning, and the weights may be used.
- the predicted values of the line prediction model and the predicted values of the offline prediction model are combined to obtain a final predicted value.
- the model to be trained may be a Logistic Regression (LR) model, in which each interval obtained by binning may be assigned a weight, and the weight is trained as a parameter of the LR model, and finally the weight values can be solved.
- LR Logistic Regression
- the above weights can be a score for the corresponding interval, which is not only between different model features (online and offline models), but also a global importance trade-off and learning between the score segments.
- the weight of the interval (0.13, 1) off-bin-7 3.237.
- the first prediction value obtained by the online prediction model is 0.66
- the second prediction value obtained by the offline prediction model is 0.25
- the first prediction is determined.
- the first interval in which the value 0.4 is located is: (0.5, 1)
- the second interval in which the second predicted value is 0.25 is: (0.13, 1).
- the first weight corresponding to the first interval (0.5, 1) can be obtained: 4.439
- the second interval is: 3.237.
- a final fusion prediction value may be determined according to the first weight and the second weight, and in an optional embodiment, the first weight and the second weight may be summed.
- the specific way of integration is not limited to summation, such as: averaging.
- the weights obtained by machine learning are used to fuse the predicted value of the line prediction model with the predicted value of the offline prediction model, and finally the score obtained by the fusion is used to predict the user's label, thereby improving the user's
- the accuracy of the predictions of the tags also meets the requirements of the business for low latency.
- the entropy-based binning and logistic regression models are used to effectively integrate online model scores and offline model scores, so that the comparability between online offline scores is adaptively adjusted in the machine learning process.
- the embodiment of the present specification further provides an apparatus for fusing a model prediction value.
- a device 300 for determining the fusion weight may include:
- the binning unit 301 is configured to bin the predicted value of the online predictive model and the predicted value of the offline predictive model according to a set binning method, respectively, according to a given number of samples, wherein the plurality of samples Each sample includes: a first predicted value, a second predicted value, and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
- the feature conversion unit 302 is configured to: convert the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located according to the result of the binning, and set a second predicted value of each sample Converting into a second interval feature corresponding to the interval in which the second predicted value is located;
- the training unit 303 is configured to: the first interval feature corresponding to each sample, the second interval feature, and the label of the sample constitute the converted sample data, and use the converted sample data to train the model,
- the trained model is used to fuse the predicted value of the online predictive model with the predicted value of the offline predictive model to obtain the final predicted value.
- a device 400 for fusing a model prediction value may include:
- the online score prediction unit 401 is configured to: acquire service data generated by the target user in a first time period before the trigger time, determine an input feature according to the service data, input the online prediction model, and output a first predicted value,
- the online prediction model is used to predict a user's tag;
- the offline score obtaining unit 402 is configured to: acquire a second predicted value corresponding to the target user obtained by using an offline prediction model, wherein an input feature of the offline prediction model is according to the target user in the past Determined by a service feature generated within two time periods, the offline prediction model is used to predict a user's tag;
- the section determining unit 403 is configured to determine, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model in advance, respectively determining the first interval and the second portion where the first predicted value is located The second interval in which the predicted value is located;
- the weight determining unit 404 is configured to: fuse the first predicted value and the second predicted value by using a pre-trained model according to the first interval and the second interval to obtain a final fusion a predicted value, the blended predicted value used to determine a label of the target user.
- the score fusion unit 404 can include:
- the weight determining subunit obtains a first weight corresponding to the first interval and a second weight corresponding to the second interval, based on a predetermined weight corresponding to each interval obtained by the binning;
- a fusion subunit using the first weight and the second weight to determine a fusion prediction value, the fusion prediction value used to determine a label of the target user.
- the fusion subunit may be configured to:
- the first weight and the second weight are summed, and the summation result is used as a fusion prediction value.
- the embodiment of the present specification further provides a computer device (such as a server), comprising at least a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor implements the foregoing method when the program is executed .
- a computer device such as a server
- the processor implements the foregoing method when the program is executed .
- FIG. 5 is a schematic diagram showing a hardware structure of a more specific computing device provided by an embodiment of the present specification.
- the device may include a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050.
- the processor 1010, the memory 1020, the input/output interface 1030, and the communication interface 1040 implement communication connections within the device with each other through the bus 1050.
- the processor 1010 can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits for performing correlation.
- the program is implemented to implement the technical solutions provided by the embodiments of the present specification.
- the memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like.
- the memory 1020 can store an operating system and other applications.
- the technical solution provided by the embodiment of the present specification is implemented by software or firmware, the related program code is saved in the memory 1020 and is called and executed by the processor 1010.
- the input/output interface 1030 is used to connect an input/output module to implement information input and output.
- the input/output/module can be configured as a component in the device (not shown) or externally connected to the device to provide the corresponding function.
- the input device may include a keyboard, a mouse, a touch screen, a microphone, various types of sensors, and the like, and the output device may include a display, a speaker, a vibrator, an indicator light, and the like.
- the communication interface 1040 is for connecting a communication module (not shown) to implement communication interaction between the device and other devices.
- the communication module can communicate by wired means (such as USB, network cable, etc.), or can communicate by wireless means (such as mobile network, WIFI, Bluetooth, etc.).
- Bus 1050 includes a path for communicating information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
- the above device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include necessary for normal operation. Other components.
- the above-mentioned devices may also include only the components necessary for implementing the embodiments of the present specification, and do not necessarily include all the components shown in the drawings.
- the embodiments of the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution of the embodiments of the present specification may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. Disks, optical disks, and the like, including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the embodiments of the present specification or embodiments.
- a computer device which may be a personal computer, server, or network device, etc.
- the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
- a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control.
- the various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
- the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
- the device embodiments described above are merely illustrative, and the modules described as separate components may or may not be physically separated, and the functions of the modules may be the same in the implementation of the embodiments of the present specification. Or implemented in multiple software and/or hardware. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Disclosed are a method and apparatus for merging model prediction values, and a device. The method for merging model prediction values comprises: on the basis of a given number of samples, binning a prediction value of an online prediction model and a prediction value of an offline prediction model separately according to a set binning method; according to the binning result, converting the first prediction value of each sample into a first interval feature corresponding to the interval in which the first prediction value is located, and converting the second prediction value of each sample into a second interval feature corresponding to the interval in which the second prediction value is located; and using the first interval feature and the second interval feature corresponding to each sample, and a sample tag to form sample data after the conversion, and using said sample data to train a model, the trained model being used for merging the prediction value of the online prediction model and the prediction value of the offline prediction model to obtain a final prediction value.
Description
本说明书涉及机器学习技术领域,尤其涉及一种对模型预测值进行融合的方法、装置和设备。The present specification relates to the field of machine learning technology, and in particular, to a method, device and device for fusing a model prediction value.
机器学习算法是一类能从数据中自动分析获得规律,并利用规律对未知数据进行预测的算法,被广泛应用于诸多领域中。Machine learning algorithms are a class of algorithms that can automatically analyze and obtain rules from data and use rules to predict unknown data. They are widely used in many fields.
在实际应用中,包括在线预测模型和离线预测模型,其中,离线预测模型通常以定时任务来实现,其优势是可以纳入维度较高的特征、并使用较为复杂的算法,从而达到较为精准的预测效果;然而,由于特征较多且算法复杂,预测过程通常较为耗时。相比于离线预测模型,在线预测模型可以使用维度较低的特征以及较为简单的算法来达到更高效的预测,其缺点便是特征不够丰富,准确度不高。可见,在线预测模型和离线预测模型各具优势,如何将两者进行合理的融合是目前业内亟待解决的问题。In practical applications, including online prediction models and offline prediction models, offline prediction models are usually implemented with timing tasks. The advantage is that they can incorporate higher-dimensional features and use more complex algorithms to achieve more accurate predictions. The effect; however, due to the large number of features and the complexity of the algorithm, the prediction process is usually time consuming. Compared with offline prediction models, online prediction models can use more dimensional features and simpler algorithms to achieve more efficient predictions. The disadvantage is that the features are not rich enough and the accuracy is not high. It can be seen that the online prediction model and the offline prediction model each have their own advantages, and how to properly integrate the two is an urgent problem to be solved in the industry.
发明内容Summary of the invention
针对上述技术问题,本说明书实施例提供一种对模型预测值进行融合的方法、装置和设备,技术方案如下:For the above technical problem, the embodiment of the present specification provides a method, device and device for fusing a model prediction value, and the technical solution is as follows:
在一个方面,提出的一种对模型预测值进行融合的方法,包括:In one aspect, a method for fusing a model predictor includes:
基于给定的若干样本,按照设定分箱法来分别对在线预测模型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到;Dividing the predicted value of the online prediction model and the predicted value of the offline prediction model according to a set binning method according to a given number of samples, wherein each of the plurality of samples includes: a first predicted value a second predicted value and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处 的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测值所处的区间对应的第二区间特征;And converting, according to the result of the binning, the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located, and converting the second predicted value of each sample into the second predicted value a second interval feature corresponding to the interval;
以每一样本对应的所述第一区间特征、所述第二区间特征以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。The transformed first sample feature, the second interval feature, and the sample tag of each sample constitute transformed sample data, and the transformed sample data is used to train the model, and the trained completed model is used for online The predicted value of the prediction model is combined with the predicted value of the offline prediction model to obtain a final predicted value.
在一个方面,提出的一种对模型预测值进行融合的方法,包括:In one aspect, a method for fusing a model predictor includes:
获取目标用户在第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值;Obtaining the service data generated by the target user in the first time period, determining the input feature according to the service data, inputting the online prediction model, and outputting the first predicted value;
获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在第二时间段内产生的业务特征来确定的;Obtaining, by using an offline prediction model, a second predicted value corresponding to the target user, where an input feature of the offline prediction model is determined according to a service feature generated by the target user in a second time period;
获取对在线预测模型的第一预测值和离线预测模型的第二预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值所处的第二区间;Obtaining a result of binning the first predicted value of the online prediction model and the second predicted value of the offline prediction model, respectively determining a first interval in which the first predicted value is located and a second predicted value Second interval
根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,所述融合预测值用来确定所述目标用户的标签。And merging the first predicted value and the second predicted value by using a pre-trained model according to the first interval and the second interval to obtain a final fused predicted value, where the fused predicted value is used To determine the label of the target user.
在一个方面,提出的一种对模型预测值进行融合的装置,包括:In one aspect, an apparatus for fusing a model predictor includes:
分箱单元,基于给定的若干样本,按照设定分箱法来分别对在线预测模型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到;a binning unit, based on a given number of samples, binning the predicted value of the online predictive model and the predicted value of the offline predictive model according to a set binning method, wherein each of the plurality of samples comprises: a first predicted value, a second predicted value, and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
特征转换单元,根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测值所处的区间对应的第二区间特征;The feature conversion unit converts the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located according to the result of the binning, and converts the second predicted value of each sample into the first predicted value a second interval feature corresponding to the interval in which the predicted value is located;
训练单元,以每一样本对应的所述第一区间特征、所述第二区间特征 以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。a training unit that constructs the transformed sample data by using the first interval feature, the second interval feature, and the sample tag corresponding to each sample, and training the model by using the transformed sample data, and the trained model is used The predicted value of the online prediction model and the predicted value of the offline prediction model are combined to obtain a final predicted value.
在一个方面,提出的一种对模型预测值进行融合的装置,包括:In one aspect, an apparatus for fusing a model predictor includes:
在线分值预测单元,获取目标用户在触发时刻前的第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值,所述在线预测模型用于预测用户的标签;The online score prediction unit acquires service data generated by the target user in a first time period before the trigger time, determines an input feature according to the service data, inputs the online input prediction model, and outputs a first predicted value, the online prediction model a label used to predict the user;
离线分值获得单元,获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在过去的第二时间段内产生的业务特征来确定的,所述离线预测模型用于预测用户的标签;An offline score obtaining unit obtains a second predicted value corresponding to the target user obtained by using an offline prediction model, wherein an input feature of the offline prediction model is generated according to the target user in a past second time period Determined by a service feature, the offline prediction model is used to predict a user's tag;
区间确定单元,根据预先对在线预测模型的预测值和离线预测模型的预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值所处的第二区间;The interval determining unit determines, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model in advance, respectively determining the first interval and the second predicted value at which the first predicted value is located Second interval;
分值融合单元,根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,所述融合预测值用来确定所述目标用户的标签。a score fusion unit that fuses the first predicted value and the second predicted value according to the first interval and the second interval to obtain a final fusion predicted value, The fusion prediction value is used to determine the label of the target user.
在一个方面,提出的一种计算机设备,包括:In one aspect, a computer apparatus is provided, comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;
所述处理器被配置为:The processor is configured to:
基于给定的若干样本,按照设定分箱法来分别对在线预测模型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到;Dividing the predicted value of the online prediction model and the predicted value of the offline prediction model according to a set binning method according to a given number of samples, wherein each of the plurality of samples includes: a first predicted value a second predicted value and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测 值所处的区间对应的第二区间特征;And converting, according to the result of the binning, the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located, and converting the second predicted value of each sample into the second predicted value a second interval feature corresponding to the interval;
以每一样本对应的所述第一区间特征、所述第二区间特征以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。The transformed first sample feature, the second interval feature, and the sample tag of each sample constitute transformed sample data, and the transformed sample data is used to train the model, and the trained completed model is used for online The predicted value of the prediction model is combined with the predicted value of the offline prediction model to obtain a final predicted value.
在一个方面,提出的一种计算机设备,包括:In one aspect, a computer apparatus is provided, comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;
所述处理器被配置为:The processor is configured to:
在线分值预测单元,获取目标用户在触发时刻前的第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值,所述在线预测模型用于预测用户的标签;The online score prediction unit acquires service data generated by the target user in a first time period before the trigger time, determines an input feature according to the service data, inputs the online input prediction model, and outputs a first predicted value, the online prediction model a label used to predict the user;
离线分值获得单元,获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在过去的第二时间段内产生的业务特征来确定的,所述离线预测模型用于预测用户的标签;An offline score obtaining unit obtains a second predicted value corresponding to the target user obtained by using an offline prediction model, wherein an input feature of the offline prediction model is generated according to the target user in a past second time period Determined by a service feature, the offline prediction model is used to predict a user's tag;
区间确定单元,根据预先对在线预测模型的预测值和离线预测模型的预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值所处的第二区间;The interval determining unit determines, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model in advance, respectively determining the first interval and the second predicted value at which the first predicted value is located Second interval;
分值融合单元,根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,所述融合预测值用来确定所述目标用户的标签。a score fusion unit that fuses the first predicted value and the second predicted value according to the first interval and the second interval to obtain a final fusion predicted value, The fusion prediction value is used to determine the label of the target user.
本说明书实施例所提供的技术方案所产生的效果包括:The effects of the technical solutions provided by the embodiments of the present specification include:
通过机器学习得到的模型来对所述线预测模型的预测值和所述离线预测模型的预测值进行融合,最终利用融合得到的分值来对用户的标签进行预测,从而在提高了对用户的标签进行预测的准确性的同时,还满足了业务对低时延的要求。The machine-learned model is used to fuse the predicted value of the line prediction model with the predicted value of the offline prediction model, and finally the score obtained by the fusion is used to predict the user's label, thereby improving the user's The accuracy of the predictions of the tags also meets the requirements of the business for low latency.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本说明书实施例。The above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the embodiments.
此外,本说明书实施例中的任一实施例并不需要达到上述的全部效果。Moreover, any of the embodiments of the present specification does not need to achieve all of the above effects.
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a few embodiments described in the embodiments of the present specification, and other drawings can be obtained from those skilled in the art based on these drawings.
图1是本说明书实施例提供的一种对模型预测值进行融合的方法的流程示意图;1 is a schematic flow chart of a method for fusing a model prediction value according to an embodiment of the present specification;
图2是本说明书实施例提供的一种确定融合权重的过程;2 is a process for determining a fusion weight provided by an embodiment of the present specification;
图3是本说明书实施例提供的一种对模型预测值进行融合的装置(权重训练阶段)的结构示意图;3 is a schematic structural diagram of a device (weight training phase) for integrating model prediction values according to an embodiment of the present disclosure;
图4是本说明书实施例提供的一种对模型预测值进行融合的装置(分值融合阶段)的结构示意图;4 is a schematic structural diagram of a device (a score fusion phase) for fusing a model prediction value according to an embodiment of the present specification;
图5是用于配置本说明书实施例装置的一种设备的结构示意图。Figure 5 is a block diagram showing the structure of an apparatus for configuring an apparatus of an embodiment of the present specification.
为了使本领域技术人员更好地理解本说明书实施例中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the accompanying drawings in the embodiments of the present specification. The examples are only a part of the embodiments of the specification, and not all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this specification should fall within the scope of protection.
参见图1所示,在本说明书一实施例中,一种对模型预测值进行融合的方法,其用来对在线预测模型所得到的分值和离线预测模型所得到的分值进行融合,该方法可以包括下述步骤101~104,其中:Referring to FIG. 1 , in an embodiment of the present specification, a method for fusing a model prediction value is used to fuse a score obtained by an online prediction model with a score obtained by an offline prediction model. The method can include the following steps 101-104, wherein:
步骤101:获取目标用户在第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值。Step 101: Acquire service data generated by the target user in the first time period, determine an input feature according to the service data, input the online prediction model, and output a first predicted value.
步骤102:获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在第二时间段内产生的业务特征来确定的。Step 102: Acquire a second prediction value corresponding to the target user obtained by using an offline prediction model, where an input feature of the offline prediction model is determined according to a service feature generated by the target user in a second time period. of.
本文中,所述在线预测模型和所述离线预测模型均为利用机器学习算法构建的用来对用户的标签进行预测的模型。这两个模型所需预测的用户标签可以是与具体业务相关的,比如:对于一种网络支付业务,所需预测的用户标签可以分为:“高风险用户”、“中风险用户”、“低风险用户”,等等。对于一种信息推荐业务,所需预测的用户标签可以分为:“体育类”、“教育类”、“财经类”,等等。在线预测模型和离线预测模型都是采用一定数量的训练样本来训练的,这些训练样本中的每一样本可以包括:样本用户在参与特定业务(如网络支付业务)的过程中所产生的一种或多种行为数据,以及样本用户被确定的标签。其中,可以采用同一批样本来对上述在线预测模型和离线预测模型进行训练,也可以采用两批不同的样本来对在线预测模型和离线预测模型进行训练,本文不作限制。Herein, the online prediction model and the offline prediction model are models constructed by using a machine learning algorithm to predict a user's tags. The user tags that the two models need to predict may be related to specific services. For example, for a network payment service, the user tags required for prediction can be classified into: “high-risk users”, “medium risk users”, “ Low-risk users", and so on. For an information recommendation service, the user tags required for prediction can be classified into: "sports class", "education class", "financial class", and the like. Both the online prediction model and the offline prediction model are trained by using a certain number of training samples, and each of the training samples may include: a sample generated by the sample user in participating in a specific service (such as a network payment service). Or multiple behavioral data, as well as the label that the sample user is identified. The same batch of samples may be used to train the online prediction model and the offline prediction model, or two different samples may be used to train the online prediction model and the offline prediction model, which are not limited herein.
在本说明书实施例中,离线预测模型可以是通过定时任务来实现的,如:每天在指定时刻或指定时间段执行一次离线的分值预测,该预测过程可以是针对全量用户的;而在线预测模型可以由特定用户的操作来触发,如:用户点击某个网页的行为便可以触发一次在线预测模型的分值计算过程。In the embodiment of the present specification, the offline prediction model may be implemented by a timing task, such as: performing offline score prediction every day at a specified time or a specified time period, the prediction process may be for a full amount of users; and online prediction The model can be triggered by the operation of a specific user. For example, the behavior of a user clicking a web page can trigger a score calculation process of the online prediction model.
因为离线预测模型相较于在线预测模型,通常采用更高维度的特征数据,特征数据的时间跨度也可以更长,且可以采用更加复杂的算法。如图1所示,以特定例子来说,在T日,离线预测模型可以获取每一用户在T-1日在参与特定业务的过程中所产生的业务数据(特征A),根据获得的业务数据(特征A)进行相应的处理,可以得到输入特征并输入到离线预测模型中,得到各用户的离线预测分值(即文中的第二预测值)并写入到数据 库X中。而对于在线预测模型,可以不断采集用户的在线特征数据(特征B)并写入到数据库Y中,其中,所述在线特征数据可以是用户在参与特定业务的过程中所产生的准实时的业务数据,例如:在线预测的触发时刻为t1,则在线特征数据可以是t0~t1(如3分钟)这段时间段内所产生的业务数据。可见,在用来发起预测流程的用户请求到来后,调度器需要做两个任务,其一是从数据库X中读取最近一次由离线预测模型计算获得的与目标用户对应的第二预测值;其二是从数据库Y中读取该目标用户的在线特征数据来进行接下来的在线预测模型的分值预测过程。Because the offline prediction model is generally more advanced than the online prediction model, the time span of the feature data can be longer, and more complex algorithms can be used. As shown in FIG. 1 , in a specific example, on the T day, the offline prediction model can obtain the service data (feature A) generated by each user in the process of participating in a specific service on the T-1 day, according to the obtained service. The data (feature A) is processed accordingly, and the input features can be obtained and input into the offline prediction model, and the offline prediction scores of each user (ie, the second predicted values in the text) are obtained and written into the database X. For the online prediction model, the online feature data (feature B) of the user can be continuously collected and written into the database Y, wherein the online feature data can be a quasi-real-time service generated by the user in the process of participating in a specific service. The data, for example, the triggering time of the online prediction is t1, and the online feature data may be the business data generated during the period from t0 to t1 (eg, 3 minutes). It can be seen that after the user request for initiating the prediction process arrives, the scheduler needs to perform two tasks, one of which is to read from the database X the second predicted value corresponding to the target user obtained by the offline prediction model calculation; The second is to read the online feature data of the target user from the database Y to perform the score prediction process of the next online prediction model.
至此,对于任何一个目标用户,都可以通过在线预测模型获得一个预测分值,和通过离线预测模型获得一个预测分值。At this point, for any target user, a predictive score can be obtained through the online predictive model, and a predicted score can be obtained through the offline predictive model.
步骤103:根据预先对在线预测模型的预测值和离线预测模型的预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值所处的第二区间。Step 103: Determine, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model, respectively, the first interval in which the first predicted value is located and the second predicted value Second interval.
步骤104:根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,其中,所述融合预测值用来确定所述目标用户的标签。Step 104: merging the first predicted value and the second predicted value by using a pre-trained model according to the first interval and the second interval, to obtain a final fusion predicted value, where The fusion prediction value is used to determine the label of the target user.
在一可选的实施例中,步骤104可以具体包括:In an optional embodiment, step 104 may specifically include:
步骤1041:基于预先确定的与分箱得到的各区间对应的权重,获得与所述第一区间对应的第一权重及与所述第二区间对应的第二权重。其中,所述模型的待训练参数包括与分箱得到的各区间对应的权重。Step 1041: Obtain a first weight corresponding to the first interval and a second weight corresponding to the second interval, based on a predetermined weight corresponding to each interval obtained by the binning. The parameters to be trained of the model include weights corresponding to the intervals obtained by the binning.
步骤1042:利用所述第一权重和所述第二权重来确定融合预测值,所述融合预测值用来确定所述目标用户的标签。Step 1042: Determine, by using the first weight and the second weight, a fusion prediction value, where the fusion prediction value is used to determine a label of the target user.
由于上述步骤103~步骤104需要基于分箱结果和与分箱得到的各区间对应的权重来实现,故,在详细介绍步骤103~步骤104之前,需要介绍一种确定融合权重的方法。如图2所示,在一实施例中,该方法包括步骤201~步骤203,其中:Since the above steps 103 to 104 need to be implemented based on the binning result and the weight corresponding to each segment obtained by the binning, before the steps 103 to 104 are described in detail, a method for determining the fusion weight needs to be introduced. As shown in FIG. 2, in an embodiment, the method includes steps 201 to 203, where:
步骤201:基于给定的若干样本,按照设定分箱法来分别对在线预测模 型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到。Step 201: Bind the predicted value of the online prediction model and the predicted value of the offline prediction model according to a set binning method according to a given number of samples, wherein each sample of the plurality of samples includes: a predicted value, a second predicted value, and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model.
该步骤201中提及的样本可以与用来训练上述离线预测模型和/或在线预测模型的样本相同,当然,也可以是不同的样本,对此不作限制。The sample mentioned in the step 201 may be the same as the sample used to train the above-mentioned offline prediction model and/or the online prediction model. Of course, it may be a different sample, which is not limited thereto.
在一实施例中,所述设定分箱法可以为基于熵的分箱法。基于熵的分箱法是在分箱时考虑因变量的取值,使得分箱后达到最小熵(minimumentropy)。基于熵的分箱法的好处是能够在高分值区域展示较好的区分性。当然,所述设定分箱法还可以是基于基尼的分箱法、或等频分箱法等。In an embodiment, the set binning method may be an entropy based binning method. The entropy-based binning method considers the value of the dependent variable when binning, so that the minimum entropy (minimumentropy) is achieved after binning. The benefit of the entropy-based binning method is the ability to show better discrimination in high score areas. Of course, the setting binning method may also be a Gini-based binning method, an equal-frequency binning method, or the like.
步骤202:根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测值所处的区间对应的第二区间特征。Step 202: Convert, according to the result of the binning, the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located, and convert the second predicted value of each sample into the second predicted value. The second interval feature corresponding to the interval in which the predicted value is located.
在一个例子中,假设第一预测值和第二预测值都是介于0~1之间,则对在线预测模型的预测值进行分箱后,所得到的分割点包括:0、0.1、0.13、0.15、0.2、0.3、0.5、1;对离线预测模型的预测值进行分箱后,所得到的分割点包括:0、0.03、0.05、0.08、0.09、0.11、0.13、1;也就是说,在线预测模型和离线预测模型的输出值在分箱后分别得到7个区间。In an example, if the first predicted value and the second predicted value are both between 0 and 1, after the predicted value of the online predictive model is binned, the obtained split points include: 0, 0.1, 0.13. , 0.15, 0.2, 0.3, 0.5, 1; after binning the predicted values of the offline prediction model, the obtained segmentation points include: 0, 0.03, 0.05, 0.08, 0.09, 0.11, 0.13, 1; The output values of the online prediction model and the offline prediction model are respectively obtained in 7 intervals after binning.
在一实施例中,可以采用one-hot规则来实现步骤202的特征转化。假设一个样本的第一预测值为0.17,第二预测值为0.12,则由于0.17处于第4个区间(0.15,0.2)内,0.12处于第6个区间(0.11,0.13)内,采用one-hot规则可以将第一预测值:0.17转换为第一区间特征:on-bin-0001000(“on-bin”为在线预测模型的标识),将第二预测值:0.12转换为第二区间特征:off-bin-0000010(“off-bin”为离线预测模型的标识)。按照同样的方法,可以逐一对其他样本中的第一预测值和第二预测值进行特征转化。In an embodiment, the one-hot rule may be employed to implement the feature conversion of step 202. Suppose a sample has a first predicted value of 0.17 and a second predicted value of 0.12. Since 0.17 is in the 4th interval (0.15, 0.2) and 0.12 is in the 6th interval (0.11, 0.13), one-hot is used. The rule may convert the first predicted value: 0.17 into the first interval feature: on-bin-0001000 ("on-bin" is the identifier of the online prediction model), and convert the second predicted value: 0.12 into the second interval feature: off -bin-0000010 ("off-bin" is the identifier of the offline prediction model). In the same way, feature conversion can be performed on the first predicted value and the second predicted value in one pair of other samples.
步骤203:以每一样本对应的所述第一区间特征、所述第二区间特征以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模 型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。Step 203: constituting the transformed sample data by using the first interval feature, the second interval feature, and the sample tag corresponding to each sample, and training the model by using the transformed sample data, and the trained model is used. The predicted value of the online prediction model and the predicted value of the offline prediction model are combined to obtain a final predicted value.
其中,所述转化后的样本数据除了所述第一区间特征、所述第二区间特征以及样本的标签之外,还可以包括其他数据。即,所述“构成”并不是封闭的。The converted sample data may include other data in addition to the first interval feature, the second interval feature, and the label of the sample. That is, the "composition" is not closed.
在以上例子中,在特征转化前,某条样本数据例如为:In the above example, before the feature conversion, a piece of sample data is, for example:
{0.17,0.12,“中风险用户”};{0.17, 0.12, "medium risk users"};
在特征转化后,得到的新的一条样本数据例如为:After the feature is transformed, the new sample data obtained is, for example:
{0001000,0000010,“中风险用户”}{0001000,0000010, "medium risk users"}
本文待训练的模型可以为线性模型或非线性模型,在采用线性模型的一种实施例中,所述模型的待训练参数可以包括与分箱得到的各区间对应的权重,所述权重可以用于对线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。待训练的模型可以是逻辑回归(Logistic Regression,LR)模型,其中,可以为分箱得到的各区间分别分配一个权重,并将该权重作为LR模型的参数进行训练,最终可以求解出各个权重值。上述权重可以为相应区间的一个评分,该评分不仅是在不同模型特征间(在线、离线模型),也是在各个分数区间之间做了一个全局的重要性权衡和学习。The model to be trained in this paper may be a linear model or a nonlinear model. In an embodiment adopting a linear model, the parameters to be trained of the model may include weights corresponding to the intervals obtained by binning, and the weights may be used. The predicted values of the line prediction model and the predicted values of the offline prediction model are combined to obtain a final predicted value. The model to be trained may be a Logistic Regression (LR) model, in which each interval obtained by binning may be assigned a weight, and the weight is trained as a parameter of the LR model, and finally the weight values can be solved. . The above weights can be a score for the corresponding interval, which is not only between different model features (online and offline models), but also a global importance trade-off and learning between the score segments.
沿用上文提到的例子,最终可以得到以下权重:Following the example mentioned above, you can finally get the following weights:
区间(0,0.1)的权重on-bin-1=1.054,The weight of the interval (0, 0.1) is on-bin-1=1.054,
……......
区间(0.5,1)的权重on-bin-7=4.439;The weight of the interval (0.5, 1) is on-bin-7=4.439;
区间(0,0.03)的权重off-bin-1=0.604,The weight of the interval (0, 0.03) off-bin-1=0.604,
……......
区间(0.13,1)的权重off-bin-7=3.237。The weight of the interval (0.13, 1) off-bin-7 = 3.237.
接下来,继续结合以上具体例子来对上述步骤103至步骤104进行说明。假设对于某个目标用户,通过在线预测模型获得的第一预测值为0.66, 通过离线预测模型获得的第二预测值为0.25,则结合上述例子,首先在步骤103中,确定所述第一预测值0.4所处的第一区间为:(0.5,1),所述第二预测值0.25所处的第二区间为:(0.13,1)。随后在步骤1041中,基于预先确定的与分箱得到的各区间对应的权重,可以获得与所述第一区间:(0.5,1)对应的第一权重是:4.439,与所述第二区间:(0.13,1)对应的第二权重是:3.237。Next, the above steps 103 to 104 will be described in conjunction with the above specific examples. Suppose that for a certain target user, the first prediction value obtained by the online prediction model is 0.66, and the second prediction value obtained by the offline prediction model is 0.25, then in combination with the above example, first in step 103, the first prediction is determined. The first interval in which the value 0.4 is located is: (0.5, 1), and the second interval in which the second predicted value is 0.25 is: (0.13, 1). Then, in step 1041, based on the predetermined weight corresponding to each interval obtained by the binning, the first weight corresponding to the first interval: (0.5, 1) can be obtained: 4.439, and the second interval. The second weight corresponding to :(0.13,1) is: 3.237.
最终,在步骤1042中,可以根据上述第一权重和第二权重来确定最终的融合预测值,在可选的实施例中,可以将所述第一权重和所述第二权重进行求和,并将求和结果作为融合预测值,即融合预测值=4.439+3.237=7.676。当然,融合的具体方式并不限于求和,如:求平均等。最终,可以根据具体业务来决定如何运用所述融合预测值。Finally, in step 1042, a final fusion prediction value may be determined according to the first weight and the second weight, and in an optional embodiment, the first weight and the second weight may be summed. The summation result is taken as the fusion prediction value, that is, the fusion prediction value = 4.439 + 3.237 = 7.766. Of course, the specific way of integration is not limited to summation, such as: averaging. Finally, it is possible to decide how to apply the fusion prediction value according to the specific business.
本说明书实施例所提供的技术方案所产生的效果包括:The effects of the technical solutions provided by the embodiments of the present specification include:
通过机器学习得到的权重来对所述线预测模型的预测值和所述离线预测模型的预测值进行融合,最终利用融合得到的分值来对用户的标签进行预测,从而在提高了对用户的标签进行预测的准确性的同时,还满足了业务对低时延的要求。此外,利用基于熵的分箱和逻辑回归模型,将在线模型分值和离线模型分值进行有效整合,使得在线离线分值之间的可比性在机器学习过程中得到自适应调整。The weights obtained by machine learning are used to fuse the predicted value of the line prediction model with the predicted value of the offline prediction model, and finally the score obtained by the fusion is used to predict the user's label, thereby improving the user's The accuracy of the predictions of the tags also meets the requirements of the business for low latency. In addition, the entropy-based binning and logistic regression models are used to effectively integrate online model scores and offline model scores, so that the comparability between online offline scores is adaptively adjusted in the machine learning process.
相应于上述方法实施例,本说明书实施例还提供一种对模型预测值进行融合的装置。Corresponding to the above method embodiment, the embodiment of the present specification further provides an apparatus for fusing a model prediction value.
参见图3所示,在一实施例中,在融合权重的训练阶段,一种确定融合权重的装置300可以包括:Referring to FIG. 3, in an embodiment, in the training phase of the fusion weight, a device 300 for determining the fusion weight may include:
分箱单元301,被配置为:基于给定的若干样本,按照设定分箱法来分别对在线预测模型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到;The binning unit 301 is configured to bin the predicted value of the online predictive model and the predicted value of the offline predictive model according to a set binning method, respectively, according to a given number of samples, wherein the plurality of samples Each sample includes: a first predicted value, a second predicted value, and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;
特征转换单元302,被配置为:根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测值所处的区间对应的第二区间特征;The feature conversion unit 302 is configured to: convert the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located according to the result of the binning, and set a second predicted value of each sample Converting into a second interval feature corresponding to the interval in which the second predicted value is located;
训练单元303,被配置为:以每一样本对应的所述第一区间特征、所述第二区间特征以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。The training unit 303 is configured to: the first interval feature corresponding to each sample, the second interval feature, and the label of the sample constitute the converted sample data, and use the converted sample data to train the model, The trained model is used to fuse the predicted value of the online predictive model with the predicted value of the offline predictive model to obtain the final predicted value.
参见图4所示,在一实施例中,在分值融合阶段,一种对模型预测值进行融合的装置400可以包括:Referring to FIG. 4, in an embodiment, in the score fusion phase, a device 400 for fusing a model prediction value may include:
在线分值预测单元401,被配置为:获取目标用户在触发时刻前的第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值,所述在线预测模型用于预测用户的标签;The online score prediction unit 401 is configured to: acquire service data generated by the target user in a first time period before the trigger time, determine an input feature according to the service data, input the online prediction model, and output a first predicted value, The online prediction model is used to predict a user's tag;
离线分值获得单元402,被配置为:获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在过去的第二时间段内产生的业务特征来确定的,所述离线预测模型用于预测用户的标签;The offline score obtaining unit 402 is configured to: acquire a second predicted value corresponding to the target user obtained by using an offline prediction model, wherein an input feature of the offline prediction model is according to the target user in the past Determined by a service feature generated within two time periods, the offline prediction model is used to predict a user's tag;
区间确定单元403,被配置为:根据预先对在线预测模型的预测值和离线预测模型的预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值所处的第二区间;The section determining unit 403 is configured to determine, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model in advance, respectively determining the first interval and the second portion where the first predicted value is located The second interval in which the predicted value is located;
权重确定单元404,被配置为:根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,所述融合预测值用来确定所述目标用户的标签。The weight determining unit 404 is configured to: fuse the first predicted value and the second predicted value by using a pre-trained model according to the first interval and the second interval to obtain a final fusion a predicted value, the blended predicted value used to determine a label of the target user.
在一可选实施例中,所述分值融合单元404可包括:In an optional embodiment, the score fusion unit 404 can include:
权重确定子单元,基于预先确定的与分箱得到的各区间对应的权重,获得与所述第一区间对应的第一权重及与所述第二区间对应的第二权重;The weight determining subunit obtains a first weight corresponding to the first interval and a second weight corresponding to the second interval, based on a predetermined weight corresponding to each interval obtained by the binning;
融合子单元,利用所述第一权重和所述第二权重来确定融合预测值,所述融合预测值用来确定所述目标用户的标签。a fusion subunit, using the first weight and the second weight to determine a fusion prediction value, the fusion prediction value used to determine a label of the target user.
在一实施例中,所述融合子单元可以被配置为:In an embodiment, the fusion subunit may be configured to:
将所述第一权重和所述第二权重进行求和,并将求和结果作为融合预测值。The first weight and the second weight are summed, and the summation result is used as a fusion prediction value.
上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For details of the implementation process of the functions and functions of the modules in the foregoing devices, refer to the implementation process of the corresponding steps in the foregoing methods, and details are not described herein again.
本说明书实施例还提供一种计算机设备(如服务器),其至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现前述方法。The embodiment of the present specification further provides a computer device (such as a server), comprising at least a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor implements the foregoing method when the program is executed .
图5示出了本说明书实施例所提供的一种更为具体的计算设备硬件结构示意图,该设备可以包括:处理器1010、存储器1020、输入/输出接口1030、通信接口1040和总线1050。其中处理器1010、存储器1020、输入/输出接口1030和通信接口1040通过总线1050实现彼此之间在设备内部的通信连接。FIG. 5 is a schematic diagram showing a hardware structure of a more specific computing device provided by an embodiment of the present specification. The device may include a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input/output interface 1030, and the communication interface 1040 implement communication connections within the device with each other through the bus 1050.
处理器1010可以采用通用的CPU(Central Processing Unit,中央处理器)、微处理器、应用专用集成电路(Application Specific Integrated Circuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本说明书实施例所提供的技术方案。The processor 1010 can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits for performing correlation. The program is implemented to implement the technical solutions provided by the embodiments of the present specification.
存储器1020可以采用ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、静态存储设备,动态存储设备等形式实现。存储器1020可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1020中,并由处理器1010来调用执行。The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 can store an operating system and other applications. When the technical solution provided by the embodiment of the present specification is implemented by software or firmware, the related program code is saved in the memory 1020 and is called and executed by the processor 1010.
输入/输出接口1030用于连接输入/输出模块,以实现信息输入及输出。输入输出/模块可以作为组件配置在设备中(图中未示出),也可以外接于设备以提供相应功能。其中输入设备可以包括键盘、鼠标、触摸屏、麦克风、各类传感器等,输出设备可以包括显示器、扬声器、振动器、指示灯等。The input/output interface 1030 is used to connect an input/output module to implement information input and output. The input/output/module can be configured as a component in the device (not shown) or externally connected to the device to provide the corresponding function. The input device may include a keyboard, a mouse, a touch screen, a microphone, various types of sensors, and the like, and the output device may include a display, a speaker, a vibrator, an indicator light, and the like.
通信接口1040用于连接通信模块(图中未示出),以实现本设备与其 他设备的通信交互。其中通信模块可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信。The communication interface 1040 is for connecting a communication module (not shown) to implement communication interaction between the device and other devices. The communication module can communicate by wired means (such as USB, network cable, etc.), or can communicate by wireless means (such as mobile network, WIFI, Bluetooth, etc.).
总线1050包括一通路,在设备的各个组件(例如处理器1010、存储器1020、输入/输出接口1030和通信接口1040)之间传输信息。 Bus 1050 includes a path for communicating information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
需要说明的是,尽管上述设备仅示出了处理器1010、存储器1020、输入/输出接口1030、通信接口1040以及总线1050,但是在具体实施过程中,该设备还可以包括实现正常运行所必需的其他组件。此外,本领域的技术人员可以理解的是,上述设备中也可以仅包含实现本说明书实施例方案所必需的组件,而不必包含图中所示的全部组件。It should be noted that although the above device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include necessary for normal operation. Other components. In addition, it will be understood by those skilled in the art that the above-mentioned devices may also include only the components necessary for implementing the embodiments of the present specification, and do not necessarily include all the components shown in the drawings.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本说明书实施例可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本说明书实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本说明书实施例各个实施例或者实施例的某些部分所述的方法。It can be clearly understood by those skilled in the art that the embodiments of the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution of the embodiments of the present specification may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. Disks, optical disks, and the like, including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the embodiments of the present specification or embodiments.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control. A combination of a tablet, a tablet, a wearable device, or any of these devices.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所 描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,在实施本说明书实施例方案时可以把各模块的功能在同一个或多个软件和/或硬件中实现。也可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described above are merely illustrative, and the modules described as separate components may or may not be physically separated, and the functions of the modules may be the same in the implementation of the embodiments of the present specification. Or implemented in multiple software and/or hardware. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
以上所述仅是本说明书实施例的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本说明书实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本说明书实施例的保护范围。The above is only a specific embodiment of the embodiments of the present specification, and it should be noted that those skilled in the art can make some improvements and refinements without departing from the principles of the embodiments of the present specification. Improvements and retouching should also be considered as protection of embodiments of the present specification.
Claims (14)
- 一种对模型预测值进行融合的方法,包括:A method of fusing model predictions, including:基于给定的若干样本,按照设定分箱法来分别对在线预测模型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到;Dividing the predicted value of the online prediction model and the predicted value of the offline prediction model according to a set binning method according to a given number of samples, wherein each of the plurality of samples includes: a first predicted value a second predicted value and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测值所处的区间对应的第二区间特征;And converting, according to the result of the binning, the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located, and converting the second predicted value of each sample into the second predicted value a second interval feature corresponding to the interval;以每一样本对应的所述第一区间特征、所述第二区间特征以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。The transformed first sample feature, the second interval feature, and the sample tag of each sample constitute transformed sample data, and the transformed sample data is used to train the model, and the trained completed model is used for online The predicted value of the prediction model is combined with the predicted value of the offline prediction model to obtain a final predicted value.
- 根据权利要求1所述的方法,所述设定分箱法包括:基于熵的分箱法、或基于基尼的分箱法、或等频分箱法。The method according to claim 1, wherein the setting binning method comprises an entropy-based binning method, or a Gini-based binning method, or an equal-frequency binning method.
- 根据权利要求1所述的方法,所述模型的待训练参数包括与分箱得到的各区间对应的权重,所述权重用于对线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。The method according to claim 1, wherein the parameter to be trained of the model includes a weight corresponding to each interval obtained by binning, and the weight is used to fuse the predicted value of the line prediction model with the predicted value of the offline prediction model. The final predicted value.
- 一种对模型预测值进行融合的方法,包括:A method of fusing model predictions, including:获取目标用户在第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值;Obtaining the service data generated by the target user in the first time period, determining the input feature according to the service data, inputting the online prediction model, and outputting the first predicted value;获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在第二时间段内产生的业务特征来确定的;Obtaining, by using an offline prediction model, a second predicted value corresponding to the target user, where an input feature of the offline prediction model is determined according to a service feature generated by the target user in a second time period;获取对在线预测模型的第一预测值和离线预测模型的第二预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值 所处的第二区间;Obtaining a result of binning the first predicted value of the online prediction model and the second predicted value of the offline prediction model, respectively determining a first interval in which the first predicted value is located and a second predicted value Second interval根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,所述融合预测值用来确定所述目标用户的标签。And merging the first predicted value and the second predicted value by using a pre-trained model according to the first interval and the second interval to obtain a final fused predicted value, where the fused predicted value is used To determine the label of the target user.
- 根据权利要求3所述的方法,所述利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合得到最终的融合预测值,包括:The method according to claim 3, wherein the merging the first predicted value and the second predicted value by using a pre-trained model to obtain a final fused predicted value comprises:基于预先确定的与分箱得到的各区间对应的权重,获得与所述第一区间对应的第一权重及与所述第二区间对应的第二权重,所述模型的待训练参数包括与分箱得到的各区间对应的权重;Obtaining, according to a predetermined weight corresponding to each interval obtained by the binning, a first weight corresponding to the first interval and a second weight corresponding to the second interval, where the parameters to be trained of the model include and The weight corresponding to each interval obtained by the box;利用所述第一权重和所述第二权重来确定融合预测值。The fusion prediction value is determined using the first weight and the second weight.
- 根据权利要求5所述的方法,所述利用所述第一权重和所述第二权重来确定融合预测值,包括:The method according to claim 5, wherein the determining the fusion prediction value by using the first weight and the second weight comprises:将所述第一权重和所述第二权重进行求和,并将求和结果作为融合预测值。The first weight and the second weight are summed, and the summation result is used as a fusion prediction value.
- 一种对模型预测值进行融合的装置,包括:A device for fusing model prediction values, comprising:分箱单元,基于给定的若干样本,按照设定分箱法来分别对在线预测模型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到;a binning unit, based on a given number of samples, binning the predicted value of the online predictive model and the predicted value of the offline predictive model according to a set binning method, wherein each of the plurality of samples comprises: a first predicted value, a second predicted value, and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;特征转换单元,根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测值所处的区间对应的第二区间特征;The feature conversion unit converts the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located according to the result of the binning, and converts the second predicted value of each sample into the first predicted value a second interval feature corresponding to the interval in which the predicted value is located;训练单元,以每一样本对应的所述第一区间特征、所述第二区间特征以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。a training unit that constructs the transformed sample data by using the first interval feature, the second interval feature, and the sample tag corresponding to each sample, and training the model by using the transformed sample data, and the trained model is used The predicted value of the online prediction model and the predicted value of the offline prediction model are combined to obtain a final predicted value.
- 根据权利要求7所述的装置,所述设定分箱法包括:基于熵的分箱法、或基于基尼的分箱法、或等频分箱法。The apparatus according to claim 7, wherein the setting binning method comprises an entropy-based binning method, or a Gini-based binning method, or an equal-frequency binning method.
- 根据权利要求7所述的装置,所述模型的待训练参数包括与分箱得到的各区间对应的权重,所述权重用于对线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。The apparatus according to claim 7, wherein the parameter to be trained of the model includes a weight corresponding to each section obtained by binning, and the weight is used to fuse the predicted value of the line prediction model with the predicted value of the offline prediction model. The final predicted value.
- 一种对模型预测值进行融合的装置,包括:A device for fusing model prediction values, comprising:在线分值预测单元,获取目标用户在触发时刻前的第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值,所述在线预测模型用于预测用户的标签;The online score prediction unit acquires service data generated by the target user in a first time period before the trigger time, determines an input feature according to the service data, inputs the online input prediction model, and outputs a first predicted value, the online prediction model a label used to predict the user;离线分值获得单元,获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在过去的第二时间段内产生的业务特征来确定的,所述离线预测模型用于预测用户的标签;An offline score obtaining unit obtains a second predicted value corresponding to the target user obtained by using an offline prediction model, wherein an input feature of the offline prediction model is generated according to the target user in a past second time period Determined by a service feature, the offline prediction model is used to predict a user's tag;区间确定单元,根据预先对在线预测模型的预测值和离线预测模型的预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值所处的第二区间;The interval determining unit determines, according to a result of binning the predicted value of the online prediction model and the predicted value of the offline prediction model in advance, respectively determining the first interval and the second predicted value at which the first predicted value is located Second interval;分值融合单元,根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,所述融合预测值用来确定所述目标用户的标签。a score fusion unit that fuses the first predicted value and the second predicted value according to the first interval and the second interval to obtain a final fusion predicted value, The fusion prediction value is used to determine the label of the target user.
- 根据权利要求10所述的装置,所述分值融合单元包括:The apparatus according to claim 10, wherein the score fusion unit comprises:权重确定子单元,基于预先确定的与分箱得到的各区间对应的权重,获得与所述第一区间对应的第一权重及与所述第二区间对应的第二权重;The weight determining subunit obtains a first weight corresponding to the first interval and a second weight corresponding to the second interval, based on a predetermined weight corresponding to each interval obtained by the binning;融合子单元,利用所述第一权重和所述第二权重来确定融合预测值,所述融合预测值用来确定所述目标用户的标签。a fusion subunit, using the first weight and the second weight to determine a fusion prediction value, the fusion prediction value used to determine a label of the target user.
- 根据权利要求11所述的装置,所述融合子单元被配置为:The apparatus of claim 11 wherein said fusion subunit is configured to:将所述第一权重和所述第二权重进行求和,并将求和结果作为融合预 测值。The first weight and the second weight are summed, and the summation result is taken as a fusion prediction value.
- 一种计算机设备,包括:A computer device comprising:处理器;processor;用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;所述处理器被配置为:The processor is configured to:基于给定的若干样本,按照设定分箱法来分别对在线预测模型的预测值和离线预测模型的预测值进行分箱,其中,所述若干样本中的每一样本包括:第一预测值、第二预测值以及样本的标签,所述第一预测值由在线预测模型预测得到,第二预测值由离线预测模型预测得到;Dividing the predicted value of the online prediction model and the predicted value of the offline prediction model according to a set binning method according to a given number of samples, wherein each of the plurality of samples includes: a first predicted value a second predicted value and a label of the sample, the first predicted value being predicted by an online prediction model, and the second predicted value being predicted by an offline prediction model;根据分箱的结果,将各样本的第一预测值转化为与该第一预测值所处的区间对应的第一区间特征,将各样本的第二预测值转化为与该第二预测值所处的区间对应的第二区间特征;And converting, according to the result of the binning, the first predicted value of each sample into a first interval feature corresponding to the interval in which the first predicted value is located, and converting the second predicted value of each sample into the second predicted value a second interval feature corresponding to the interval;以每一样本对应的所述第一区间特征、所述第二区间特征以及样本的标签构成转化后的样本数据,并利用转化后的样本数据来训练模型,该训练完成的模型用于对在线预测模型的预测值和离线预测模型的预测值进行融合得到最终的预测值。The transformed first sample feature, the second interval feature, and the sample tag of each sample constitute transformed sample data, and the transformed sample data is used to train the model, and the trained completed model is used for online The predicted value of the prediction model is combined with the predicted value of the offline prediction model to obtain a final predicted value.
- 一种计算机设备,包括:A computer device comprising:处理器;processor;用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;所述处理器被配置为:The processor is configured to:获取目标用户在第一时间段内产生的业务数据,根据所述业务数据确定输入特征并输入到在线预测模型,输出第一预测值;Obtaining the service data generated by the target user in the first time period, determining the input feature according to the service data, inputting the online prediction model, and outputting the first predicted value;获取利用离线预测模型得到的与所述目标用户对应的第二预测值,其中,所述离线预测模型的输入特征是根据所述目标用户在第二时间段内产生的业务特征来确定的;Obtaining, by using an offline prediction model, a second predicted value corresponding to the target user, where an input feature of the offline prediction model is determined according to a service feature generated by the target user in a second time period;获取对在线预测模型的第一预测值和离线预测模型的第二预测值进行分箱的结果,分别确定所述第一预测值所处的第一区间和所述第二预测值所处的第二区间;Obtaining a result of binning the first predicted value of the online prediction model and the second predicted value of the offline prediction model, respectively determining a first interval in which the first predicted value is located and a second predicted value Second interval根据所述第一区间和所述第二区间,利用预先训练得到的模型来对所述第一预测值和所述第二预测值进行融合,得到最终的融合预测值,所述融合预测值用来确定所述目标用户的标签。And merging the first predicted value and the second predicted value by using a pre-trained model according to the first interval and the second interval to obtain a final fused predicted value, where the fused predicted value is used To determine the label of the target user.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711353984.1 | 2017-12-15 | ||
CN201711353984.1A CN108052979A (en) | 2017-12-15 | 2017-12-15 | The method, apparatus and equipment merged to model predication value |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019114423A1 true WO2019114423A1 (en) | 2019-06-20 |
Family
ID=62132684
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/111824 WO2019114423A1 (en) | 2017-12-15 | 2018-10-25 | Method and apparatus for merging model prediction values, and device |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN108052979A (en) |
TW (1) | TWI718422B (en) |
WO (1) | WO2019114423A1 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111767982A (en) * | 2020-05-20 | 2020-10-13 | 北京大米科技有限公司 | Training method and device for user conversion prediction model, storage medium and electronic equipment |
CN112288457A (en) * | 2020-06-23 | 2021-01-29 | 北京沃东天骏信息技术有限公司 | Data processing method, device, equipment and medium based on multi-model calculation fusion |
CN112418258A (en) * | 2019-08-22 | 2021-02-26 | 北京京东振世信息技术有限公司 | Feature discretization method and device |
CN112711765A (en) * | 2020-12-30 | 2021-04-27 | 深圳前海微众银行股份有限公司 | Sample characteristic information value determination method, terminal, device and storage medium |
CN113312512A (en) * | 2021-06-10 | 2021-08-27 | 北京百度网讯科技有限公司 | Training method, recommendation device, electronic equipment and storage medium |
CN113920166A (en) * | 2021-10-29 | 2022-01-11 | 广州文远知行科技有限公司 | Method and device for selecting object motion model, vehicle and storage medium |
US20220398610A1 (en) * | 2021-02-01 | 2022-12-15 | Tablemanager Inc. | Method of forecasting store demand based on artificial intelligence and system therefor |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108052979A (en) * | 2017-12-15 | 2018-05-18 | 阿里巴巴集团控股有限公司 | The method, apparatus and equipment merged to model predication value |
CN108985489B (en) * | 2018-06-08 | 2021-12-31 | 创新先进技术有限公司 | Risk prediction method, risk prediction device and terminal equipment |
CN109063886B (en) * | 2018-06-12 | 2022-05-31 | 创新先进技术有限公司 | Anomaly detection method, device and equipment |
CN109635990B (en) * | 2018-10-12 | 2022-09-16 | 创新先进技术有限公司 | Training method, prediction method, device, electronic equipment and storage medium |
CN111242244B (en) * | 2020-04-24 | 2020-09-18 | 支付宝(杭州)信息技术有限公司 | Characteristic value sorting method, system and device |
CN111582565A (en) * | 2020-04-26 | 2020-08-25 | 支付宝(杭州)信息技术有限公司 | Data fusion method and device and electronic equipment |
CN112801358A (en) * | 2021-01-21 | 2021-05-14 | 上海东普信息科技有限公司 | Component prediction method, device, equipment and storage medium based on model fusion |
CN116402241B (en) * | 2023-06-08 | 2023-08-18 | 浙江大学 | Multi-model-based supply chain data prediction method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105679021A (en) * | 2016-02-02 | 2016-06-15 | 重庆云途交通科技有限公司 | Travel time fusion prediction and query method based on traffic big data |
CN106873571A (en) * | 2017-02-10 | 2017-06-20 | 泉州装备制造研究所 | A kind of method for early warning based on data and Model Fusion |
CN107025153A (en) * | 2016-01-29 | 2017-08-08 | 阿里巴巴集团控股有限公司 | The failure prediction method and device of disk |
CN108052979A (en) * | 2017-12-15 | 2018-05-18 | 阿里巴巴集团控股有限公司 | The method, apparatus and equipment merged to model predication value |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9563855B2 (en) * | 2014-06-27 | 2017-02-07 | Intel Corporation | Using a generic classifier to train a personalized classifier for wearable devices |
-
2017
- 2017-12-15 CN CN201711353984.1A patent/CN108052979A/en active Pending
-
2018
- 2018-10-12 TW TW107135970A patent/TWI718422B/en active
- 2018-10-25 WO PCT/CN2018/111824 patent/WO2019114423A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107025153A (en) * | 2016-01-29 | 2017-08-08 | 阿里巴巴集团控股有限公司 | The failure prediction method and device of disk |
CN105679021A (en) * | 2016-02-02 | 2016-06-15 | 重庆云途交通科技有限公司 | Travel time fusion prediction and query method based on traffic big data |
CN106873571A (en) * | 2017-02-10 | 2017-06-20 | 泉州装备制造研究所 | A kind of method for early warning based on data and Model Fusion |
CN108052979A (en) * | 2017-12-15 | 2018-05-18 | 阿里巴巴集团控股有限公司 | The method, apparatus and equipment merged to model predication value |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112418258A (en) * | 2019-08-22 | 2021-02-26 | 北京京东振世信息技术有限公司 | Feature discretization method and device |
CN111767982A (en) * | 2020-05-20 | 2020-10-13 | 北京大米科技有限公司 | Training method and device for user conversion prediction model, storage medium and electronic equipment |
CN112288457A (en) * | 2020-06-23 | 2021-01-29 | 北京沃东天骏信息技术有限公司 | Data processing method, device, equipment and medium based on multi-model calculation fusion |
CN112711765A (en) * | 2020-12-30 | 2021-04-27 | 深圳前海微众银行股份有限公司 | Sample characteristic information value determination method, terminal, device and storage medium |
US20220398610A1 (en) * | 2021-02-01 | 2022-12-15 | Tablemanager Inc. | Method of forecasting store demand based on artificial intelligence and system therefor |
CN113312512A (en) * | 2021-06-10 | 2021-08-27 | 北京百度网讯科技有限公司 | Training method, recommendation device, electronic equipment and storage medium |
CN113312512B (en) * | 2021-06-10 | 2023-10-31 | 北京百度网讯科技有限公司 | Training method, recommending device, electronic equipment and storage medium |
CN113920166A (en) * | 2021-10-29 | 2022-01-11 | 广州文远知行科技有限公司 | Method and device for selecting object motion model, vehicle and storage medium |
CN113920166B (en) * | 2021-10-29 | 2024-05-28 | 广州文远知行科技有限公司 | Method, device, vehicle and storage medium for selecting object motion model |
Also Published As
Publication number | Publication date |
---|---|
CN108052979A (en) | 2018-05-18 |
TW201928709A (en) | 2019-07-16 |
TWI718422B (en) | 2021-02-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019114423A1 (en) | Method and apparatus for merging model prediction values, and device | |
US10958748B2 (en) | Resource push method and apparatus | |
US10599449B1 (en) | Predictive action modeling to streamline user interface | |
CN108829808B (en) | Page personalized sorting method and device and electronic equipment | |
JP6384065B2 (en) | Information processing apparatus, learning method, and program | |
US9256826B2 (en) | Predicting reactions to short-text posts | |
CN111061956B (en) | Method and apparatus for generating information | |
JP6911603B2 (en) | How to generate predictive models for the categories of facilities visited by users, programs, server equipment, and processing equipment | |
US10970350B2 (en) | Method and apparatus for processing user interaction sequence data | |
US20150227964A1 (en) | Revenue Estimation through Ensemble Modeling | |
US11875241B2 (en) | Aspect pre-selection using machine learning | |
US20190138912A1 (en) | Determining insights from different data sets | |
CN107590690B (en) | Data processing method and device and server | |
US11886964B2 (en) | Provisioning interactive content based on predicted user-engagement levels | |
CN113688310B (en) | Content recommendation method, device, equipment and storage medium | |
US20230252991A1 (en) | Artificial Assistant System Notifications | |
CN111783810A (en) | Method and apparatus for determining attribute information of user | |
CN111026977A (en) | Information recommendation method and device and storage medium | |
CN110597965B (en) | Emotion polarity analysis method and device for article, electronic equipment and storage medium | |
JP6971181B2 (en) | Predictors, predictors, and programs | |
CN111026973B (en) | Commodity interest degree prediction method and device and electronic equipment | |
JP6680663B2 (en) | Information processing apparatus, information processing method, prediction model generation apparatus, prediction model generation method, and program | |
US20170004511A1 (en) | Identifying Drivers for a Metric-of-Interest | |
CN111507471A (en) | Model training method, device, equipment and storage medium | |
CN116109447A (en) | Searching method, searching device, searching equipment and searching medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18888010 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18888010 Country of ref document: EP Kind code of ref document: A1 |