CN109086791A - A kind of training method, device and the computer equipment of two classifiers - Google Patents

A kind of training method, device and the computer equipment of two classifiers Download PDF

Info

Publication number
CN109086791A
CN109086791A CN201810658424.5A CN201810658424A CN109086791A CN 109086791 A CN109086791 A CN 109086791A CN 201810658424 A CN201810658424 A CN 201810658424A CN 109086791 A CN109086791 A CN 109086791A
Authority
CN
China
Prior art keywords
training sample
weak classifier
sample
training
roc curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810658424.5A
Other languages
Chinese (zh)
Inventor
宋博文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810658424.5A priority Critical patent/CN109086791A/en
Publication of CN109086791A publication Critical patent/CN109086791A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/254Fusion techniques of classification results, e.g. of results related to same input data
    • G06F18/256Fusion techniques of classification results, e.g. of results related to same input data of results relating to different input data, e.g. multimodal recognition

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclose training method, device and the computer equipment of a kind of two classifiers, this method comprises: being iterated processing using following steps, until the number of iterations reaches preset frequency threshold value: being trained using the learning algorithm and training sample set of setting, obtain Weak Classifier, it includes multiple training samples that the training sample, which is concentrated, and any training sample in the multiple training sample has weight;The classification thresholds of the Weak Classifier are determined based on Receiver Operating Characteristics' ROC curve of the Weak Classifier;Obtain classification results of the Weak Classifier using the classification thresholds to any training sample in the specified portions sample set of the training sample set;It is adjusted based on weight of the classification results to any training sample in the multiple training sample;After iteration, the Weak Classifier that iteration each time obtains is integrated to obtain two classifiers.

Description

A kind of training method, device and the computer equipment of two classifiers
Technical field
This specification embodiment is related to technical field of data processing, more particularly to a kind of training method of two classifiers, dress It sets and computer equipment.
Background technique
Traditional machine learning model is all built upon training data and test data obeys the base of identical data distribution On plinth, such as supervised learning, still, in many situations, training data and test data simultaneously are unsatisfactory for obeying identical number According to be distributed this it is assumed that, utilize the result classified based on obtained two classifier of training data to test data It is likely to be inaccurate, is based on this, proposes TraAdaboost algorithm in the related technology, in the algorithm, according to each training Concentrate the classification of each sample whether correct and the error rate of last time general classification, to adjust the weight of each sample, with reality Now a classifying quality more preferably two classifiers are obtained by changing data distribution.
However, if positive class sample and the respective ratio of negative class sample and unbalanced in training data, for example, positive class sample accounts for 1%, negative class sample accounts for 99%, then, above-mentioned TraAdaboost algorithm tends to for minority class sample to be divided into most class samples This, to guarantee to train two classifiers obtained classification accuracy with higher on the whole, it can be seen that, for unbalanced Training data utilizes the poor performance for two disaggregated models that TraAdaboost algorithm is trained.
Summary of the invention
In view of the above technical problems, this specification embodiment provides training method, device and the calculating of a kind of two classifiers Machine equipment, technical solution are as follows:
According to this specification embodiment in a first aspect, providing a kind of training method of two classifiers, which comprises
It is iterated processing using following steps, until the number of iterations reaches preset frequency threshold value:
It is trained using the learning algorithm and training sample set of setting, obtains Weak Classifier, the training sample is concentrated Including multiple training samples, any training sample in the multiple training sample has weight;
The classification thresholds of the Weak Classifier are determined based on Receiver Operating Characteristics' ROC curve of the Weak Classifier;
The Weak Classifier is obtained using the classification thresholds in the specified portions sample set of the training sample set The classification results of any training sample;
It is adjusted based on weight of the classification results to any training sample in the multiple training sample;
After iteration, the Weak Classifier that iteration each time obtains is integrated to obtain two classifiers.
According to the second aspect of this specification embodiment, a kind of training device of two classifiers is provided, described device includes:
Training module is trained with training sample set for the learning algorithm using setting, obtains Weak Classifier, described It includes multiple training samples that training sample, which is concentrated, and any training sample in the multiple training sample has weight;
Determining module, for determining the classification thresholds of the Weak Classifier based on the ROC curve of the Weak Classifier;
Categorization module, for obtaining specifying part of the Weak Classifier using the classification thresholds to the training sample set Divide the classification results of any training sample in sample set;
Module is adjusted, for the weight based on the classification results to any training sample in the multiple training sample It is adjusted;
The training module, the determining module, the categorization module and adjustment module mutual cooperation are realized and are changed Generation processing, until meeting preset iteration stopping condition;
Module is integrated, for being integrated to obtain two classification to the Weak Classifier that iteration each time obtains after iteration Device.
According to the third aspect of this specification embodiment, a kind of computer equipment is provided, including memory, processor and deposit Store up the computer program that can be run on a memory and on a processor, wherein the processor is realized when executing described program The training method for two classifiers that this specification embodiment provides.
The technical solution that this specification embodiment provides, by being iterated processing using following steps, until iteration time Number reaches preset frequency threshold value: it is trained using the learning algorithm and training sample set of setting, obtains Weak Classifier, the instruction Practicing includes multiple training samples in sample set, and any training sample in multiple training sample has weight, is based on this weak point The ROC curve of class device determines the classification thresholds of Weak Classifier, then obtains the Weak Classifier using the classification thresholds to training sample The classification results of any training sample in this concentration specified portions sample set, based on the classification results in multiple training samples The weight of any training sample be adjusted, finally, being carried out after iteration to the Weak Classifier that iteration each time obtains Integration obtains two classifiers.Due in each iterative process, be based on the Weak Classifier trained ROC curve determine should The classification thresholds of Weak Classifier, thus it is subsequent more accurate based on classification results of the classification thresholds to training sample, also The validity being adjusted based on weight of the classification results to training sample is improved, to handle by this kind, final training The better performances of two disaggregated models obtained.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification embodiment for those of ordinary skill in the art can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is the embodiment process of the training method for two classifier of one kind that one exemplary embodiment of this specification provides Figure;
Fig. 2 is the embodiment block diagram of the training device for two classifiers that one exemplary embodiment of this specification provides;
Fig. 3 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram.
Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual, Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
Traditional machine learning model is all built upon training data and test data obeys the base of identical data distribution On plinth, two classifiers are obtained based on training data, which is used for test data.But in many situations, Training data and test data and being unsatisfactory for obey identical data distribution this it is assumed that and marking out again and test data takes Time cost and material resources cost need to be paid again from the training data of identical data distribution, thus, researcher attempts to utilize These obey the training data of different distributions with test data, and training one can be applied to test data, and obtain preferable Two classifiers of classifying quality.
To achieve the goals above, researcher proposes TraAdaboost algorithm, TraAdaboost algorithm is continued to use The basic framework of Adaboost algorithm, but the different from terms of adjusting sample weights, specifically, being calculated in TraAdaboost In method, a weight is all set for each of training sample set sample in advance, when the source domain sample that the training sample is concentrated Subset TbIn sample by mistake classification after, it may be considered that the classification difficulty of the sample is larger, to increase the sample Weight, correspondingly, when the training sample concentrate auxiliary domain sample set TaIn sample by mistake classification after, then may be used To think the sample compared to source domain sample set TbIn differences between samples it is larger, so as to reduce the weight of the sample, Reduce sample specific gravity shared during two classifier trainings, wherein above-mentioned TaWith TbDifference be, TbWith test Data obedience same distribution, and TaDifferent distributions are obeyed with test data.
In conjunction with foregoing description, in the detailed process of TraAdaboost algorithm, for each trained sample of training sample concentration One initial weight of this setting, and a number of iterations is set, it is iterated as follows: utilizing learning algorithm and training Sample set is trained, and obtains a Weak Classifier;Using the Weak Classifier to above-mentioned TbIn training sample classify, In, the classification thresholds that when classification is utilized are usually business personnel according to the preset fixed value of business experience, for example, 0.5, then, if the Weak Classifier is greater than 0.5 for the calculated sample score of a certain training sample, which is returned The class that is positive sample, conversely, the training sample is classified as negative class sample if sample score is not more than 0.5, later, based on classification As a result the Weak Classifier is calculated relative to above-mentioned TbError rate;It is subsequent, it is based on the error rate adjusting training sample concentration training The weight of sample.Finally, after iteration, multiple Weak Classifiers are integrated, obtained strong classifier is as final Two classifiers.
It seen from the above description, is the error rate based on general classification come adjusting training sample in TraAdaboost algorithm This weight, also, the error rate is to be determined by classification results namely classification thresholds, and classification thresholds are fixed values, To if the respective proportion and unbalanced of positive class sample and negative class sample that training sample is concentrated, such as positive class sample account for 1%, negative class sample accounts for 99%, then, tend to for minority class sample to be divided into most class samples using TraAdaboost algorithm This, such as all samples are all divided into the class sample that is negative, it is with higher on the whole with two classifiers for guaranteeing that training obtains Classification accuracy, it can be seen that, for unbalanced training data, two classification trained using TraAdaboost algorithm The poor performance of model.To solve the above-mentioned problems, this specification embodiment provides a kind of training method of two classifiers.
It is as follows, following embodiments are shown, the training method of two classifier is illustrated: being this explanation referring to Figure 1 The embodiment flow chart of the training method for two classifier of one kind that one exemplary embodiment of book provides, this method includes following step It is rapid:
Step 102: it is trained using the learning algorithm and training sample set of setting, obtains Weak Classifier, the training sample This concentration includes multiple training samples, and any training sample in multiple training sample has weight.
In this specification embodiment, a training sample set can be preset, it includes multiple instructions which, which concentrates, Practice sample, multiple training sample is divided into positive class sample and negative class sample again, and each training sample all has a weight.
In one embodiment, it is assumed that training sample set is { T1, T2... ..., Tn, Tn+1... ..., Tn+m, wherein { T1, T2... ..., TnIt is auxiliary domain sample set Ta, { Tn+1... ..., Tn+mIt is source domain sample set Tb, can before iteration for the first time It is that an initial weight is arranged in each training sample that the training sample is concentrated according to following formula (one):
Based on above-mentioned training sample set, in this step, then the power of training sample can be concentrated based on the training sample Redistribution is trained using the learning algorithm and the training sample set of setting, obtains a classifier, for convenience, Classifier obtained in each iterative process is known as Weak Classifier.
Wherein, the weight distribution of above-mentioned training sample can be calculated by following formula (two):
In above-mentioned formula (two), t indicates current the number of iterations, for example, if current for iteration for the first time, t 1.
In above-mentioned formula (two), wtIndicate current weight vectors, speciallyFor example, if It is currently iteration for the first time, then
In one embodiment, above-mentioned set algorithm can be SVM (Support Vector Machine, support vector machines) Algorithm or logistic regression algorithm etc..
In one embodiment, above-mentioned Weak Classifier can be the form of decision tree, or other finer classification Device, for example, RF (Random Forest, random forest) classifier.
Step 104: the classification thresholds of the Weak Classifier are determined based on the ROC curve of Weak Classifier.
In this specification embodiment, it is different from and one fixed value is set according to business experience by business personnel in the related technology For classification thresholds, propose that the ROC curve based on Weak Classifier determines classification thresholds, it will be appreciated by persons skilled in the art that ROC curve is with true positive rate (sensitivity is denoted as Sensitivity) for ordinate, false positive rate (1- specificity, wherein special Different degree is denoted as specificity) it is what abscissa was drawn, each data point thereon corresponds to a section, i.e. classification threshold Value, wherein true positive rate Sensitivity can also reflect positive class level of coverage namely coverage rate, and specificity Specificity can also reflect the positive class level of coverage for misdeeming the class that is negative, namely bother rate, as the drafting Weak Classifier ROC curve detailed process, those skilled in the art may refer to description in the related technology, and this specification embodiment is to this No longer it is described in detail.
Based on foregoing description, in one embodiment, each data point that can be directed on the ROC curve of Weak Classifier, Calculate the distance between the data point and specified coordinate point, wherein the ordinate of orthogonal axes value of specified coordinate point is business personnel's root According to the coverage rate that business experience is arranged, for convenience, referred to herein as specified coverage rate, the horizontal axis coordinate of the specified coordinate point Value then subtracts business personnel for 1 and bothers rate according to what business experience was arranged, for convenience, referred to herein as specified to bother rate.
Then, the smallest data point at a distance between the specified coordinate point is determined on ROC curve, by foregoing description It is found that the corresponding classification thresholds of each data point on ROC curve, thus then can be corresponding apart from the smallest data point by this Classification thresholds be determined as classification thresholds to be determined in the present embodiment.
In this embodiment, rate is bothered by the way that specified coverage rate is arranged and is specified according to business experience by business personnel, The performance index value of the desired Weak Classifier of business personnel is set, thus, one, which is determined, in ROC curve most possibly reaches To the classification thresholds of the desired performance index value.
In one embodiment, set algorithm logarithm can be utilized for each data point on the ROC curve of Weak Classifier The ordinate of orthogonal axes value and horizontal axis coordinate value at strong point carry out operation, for example, the set algorithm can be as shown in following formula (three), again For example, the set algorithm can be as shown in following formula (four):
Then the maximum data point of operation result is determined, by the corresponding classification thresholds of the maximum data point of the operation result It is determined as classification thresholds to be determined in the present embodiment.
In this embodiment, by carrying out operational analysis to each data point on ROC curve, therefrom choosing one can So that the optimal classification thresholds of the performance index value of Weak Classifier.
In one embodiment, above-mentioned ROC curve can be adjusted ROC curve, specifically, can use above-mentioned weak point Class device calculates the sample score of any training sample in multiple training samples, be then based on the sample score to training sample into Row determine, to judge positive and negative class sample, if a certain training sample is judged as negative sample, can decision the training sample is not held The specified event of row, conversely, if a certain training sample is judged to position positive sample, can decision specified thing is executed to the training sample Part, it is subsequent, it specifies the implementation effect of event as specified index this, the density function of the specified index is determined, by the density Function is as ROC curve Dynamic gene, further, using the ROC curve Dynamic gene, multiple training sample to Weak Classifier Original ROC curve be adjusted, be then based on ROC curve adjusted and determine classification thresholds.
In this embodiment, by being adjusted to ROC curve, then classification thresholds are determined based on ROC curve adjusted, Enable to the classification results made using the classification thresholds more acurrate.
Step 106: obtaining Weak Classifier using classification thresholds to any in the specified portions sample set of training sample set The classification results of training sample.
Step 108: being adjusted based on weight of the classification thresholds to any training sample in multiple training samples.
It is as follows, step 106 and step 108 are illustrated:
In this specification embodiment, above-mentioned specified portions sample set can be source domain sample set Tb, then, according to The description of step 106, Weak Classifier then can be based on the classification thresholds that step 104 is determined to source domain sample set TbIn sample This is classified, to obtain classification results.
Further, it is possible to calculate Weak Classifier in source domain sample set T based on classification resultsbOn error rate, note For εt, specifically, calculation formula can be as shown in following formula (five):
In above-mentioned formula (five), ht(xi) indicate the classification thresholds determined based on step 104 to the classification knot of sample Fruit, c (xi) then indicate the true classification of sample.
Subsequent, β is arranged in (six) according to the following equationt:
Further, it is possible to which (seven) adjust the weight of any training sample in multiple training samples according to the following equation It is whole:
In above-mentioned formula (seven),Wherein, N is preset frequency threshold value.
In addition, can also directly replace above-mentioned ε using 1-wAUC in this specification embodimenttSubsequent operation is participated in, Wherein, wAUC indicates area under the line of ROC curve adjusted.
Step 110: judging whether current the number of iterations reaches preset frequency threshold value, if so, continuing to execute step 112, otherwise, return to step 102.
Step 112: the Weak Classifier that iteration each time obtains is integrated to obtain two classifiers.
About the detailed description of step 108 and step 110, those skilled in the art may refer to correlation in the prior art This is no longer described in detail in description, this specification embodiment.
In addition, the output result for finally integrating two obtained classifiers can obtain in this specification embodiment for sample Point, not classification results, wherein sample score is higher, then can indicate sample be positive class sample probability it is higher, on the contrary, sample This score is lower, then can indicate sample be positive class sample probability is lower namely sample is negative class sample probability it is higher.Base In this, after step 108, then any test sample that can be concentrated test sample inputs two classifiers, obtains any survey The sample score of sample sheet.
In addition, after iteration, can also be exported any in above-mentioned multiple training samples in this specification embodiment The present weight of training sample is handled by this kind, white list formation efficiency can be improved.
The technical solution that this specification embodiment provides, by being iterated processing using following steps, until iteration time Number reaches preset frequency threshold value: it is trained using the learning algorithm and training sample set of setting, obtains Weak Classifier, the instruction Practicing includes multiple training samples in sample set, and any training sample in multiple training sample has weight, is based on this weak point The ROC curve of class device determines the classification thresholds of Weak Classifier, then obtains the Weak Classifier using the classification thresholds to training sample The classification results of any training sample in this concentration specified portions sample set, based on the classification results in multiple training samples The weight of any training sample be adjusted, finally, being carried out after iteration to the Weak Classifier that iteration each time obtains Integration obtains two classifiers.Due in each iterative process, be based on the Weak Classifier trained ROC curve determine should The classification thresholds of Weak Classifier, thus it is subsequent more accurate based on classification results of the classification thresholds to training sample, also The validity being adjusted based on weight of the classification results to training sample is improved, to handle by this kind, final training The better performances of two disaggregated models obtained.
Corresponding to above method embodiment, this specification embodiment also provides a kind of training device of two classifiers, referring to It is the embodiment block diagram of the training device for two classifiers that one exemplary embodiment of this specification provides, which can shown in Fig. 2 To include: training module 210, determining module 220, categorization module 230, adjustment module 240, and integrate module 250.
Wherein, training module 210 can be used for being trained using the learning algorithm of setting with training sample set, obtain Weak Classifier, it includes multiple training samples that the training sample, which is concentrated, any training sample tool in the multiple training sample There is weight;
Determining module 220 can be used for determining the classification threshold of the Weak Classifier based on the ROC curve of the Weak Classifier Value;
Categorization module 230 can be used for obtaining the Weak Classifier using the classification thresholds to the training sample set Specified portions sample set in any training sample classification results;
Module 240 is adjusted, can be used for based on the classification results to any trained sample in the multiple training sample This weight is adjusted;
The training module 210, the determining module 220, the categorization module 230 and 240 phase of adjustment module Mutually iterative processing is realized in cooperation, until meeting preset iteration stopping condition;
Module 250 is integrated, after can be used for iteration, the Weak Classifier that iteration each time obtains is integrated to obtain Two classifiers.
In one embodiment, the determining module 210 may include (being not shown in Fig. 2):
First computational submodule, for calculating described for each data point on the ROC curve of the Weak Classifier The distance between data point and specified coordinate point, wherein the ordinate of orthogonal axes value of the specified coordinate point is specified coverage rate, described The horizontal axis coordinate value of specified coordinate point, which subtracts to specify for 1, bothers rate;
First data point determines submodule, for determining the smallest data point of the distance between specified coordinate point;
First threshold determines submodule, for determining the classification threshold of the Weak Classifier based on the data point determined Value.
In one embodiment, the determining module 210 may include (being not shown in Fig. 2):
Second computational submodule, for being calculated using setting for each data point on the ROC curve of the Weak Classifier Method carries out operation to the ordinate of orthogonal axes value and horizontal axis coordinate value of the data point;
Second data point determines submodule, for determining the maximum data point of operation result;
Second threshold determines submodule, for determining the classification threshold of the Weak Classifier based on the data point determined Value.
In one embodiment, the determining module 210 may include (being not shown in Fig. 2):
Third computational submodule, for calculating any trained sample in the multiple training sample using the Weak Classifier Whether this sample score, and being determined based on the sample score the training sample will determine result as being directed to The sample executes the foundation of specified event;
Dynamic gene determines submodule, the density function of the specified index for estimating the multiple training sample, by institute The density function of specified index is stated as ROC curve Dynamic gene, what the specified index reflected the specified event executes effect Fruit;
Curve adjusting submodule, for utilizing the ROC curve Dynamic gene, the multiple training sample to described weak point The ROC curve of class device is adjusted;
Third threshold value determines submodule, for determining the classification thresholds of the Weak Classifier based on ROC curve adjusted.
In one embodiment, described device can also include (being not shown in Fig. 2):
Output module, for exporting the current power of any training sample in the multiple training sample after iteration Weight.
In one embodiment, described device can also include (showing in Fig. 2):
Sample points calculating module, any test sample for concentrating test sample input two classifier, obtain To the sample score of any test sample.
In one embodiment, the learning algorithm of the setting is at least following one of them:
SVM algorithm, logistic regression algorithm.
It is understood that training module 210, determining module 220, categorization module 230, adjustment module 240, and integration Module of the module 250 as five kinds of functional independences can both configure in a device simultaneously as shown in Figure 2, can also be individually It configures in a device, therefore structure shown in Fig. 2 should not be construed as the restriction to this specification example scheme.
In addition, the function of modules and the realization process of effect are specifically detailed in the above method corresponding step in above-mentioned apparatus Rapid realization process, details are not described herein.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in On reservoir and the computer program that can run on a processor, wherein processor realizes two points above-mentioned when executing described program The training method of class device, this method include at least: processing are iterated using following steps, until the number of iterations reaches preset Frequency threshold value: being trained using the learning algorithm and training sample set of setting, obtains Weak Classifier, and the training sample is concentrated Including multiple training samples, any training sample in the multiple training sample has weight;Based on the Weak Classifier Receiver Operating Characteristics' ROC curve determines the classification thresholds of the Weak Classifier;It obtains the Weak Classifier and utilizes the classification Classification results of the threshold value to any training sample in the specified portions sample set of the training sample set;It is tied based on the classification Fruit is adjusted the weight of any training sample in the multiple training sample;After iteration, iteration each time is obtained To Weak Classifier integrated to obtain two classifiers.
Fig. 3 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram, The equipment may include: processor 310, memory 320, input/output interface 330, communication interface 340 and bus 350.Wherein Processor 310, memory 320, input/output interface 330 and communication interface 340 between the realization of bus 350 by setting Standby internal communication connection.
Processor 310 can use general CPU (Central Processing Unit, central processing unit), micro process Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 320 can use ROM (Read Only Memory, read-only memory), RAM (Random Access Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 320 can store Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware When, relevant program code is stored in memory 320, and execution is called by processor 310.
Input/output interface 330 is for connecting input/output module, to realize information input and output.Input and output/ Module can be used as component Configuration and (be not shown in Fig. 3) in a device, can also be external in equipment to provide corresponding function.Wherein Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display, Loudspeaker, vibrator, indicator light etc..
Communication interface 340 is used for connection communication module (being not shown in Fig. 3), to realize the communication of this equipment and other equipment Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly (such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 350 includes an access, in various components (such as the processor 310, memory 320, input/output of equipment Interface 330 and communication interface 340) between transmit information.
It should be noted that although above equipment illustrates only processor 310, memory 320, input/output interface 330, communication interface 340 and bus 350, but in the specific implementation process, which can also include realizing to operate normally Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey It realizes that the training method of two classifier above-mentioned, this method include at least when sequence is executed by processor: being carried out using following steps Iterative processing, until the number of iterations reaches preset frequency threshold value: being instructed using the learning algorithm and training sample set of setting Practice, obtains Weak Classifier, it includes multiple training samples that the training sample, which is concentrated, any training in the multiple training sample Sample has weight;The classification threshold of the Weak Classifier is determined based on Receiver Operating Characteristics' ROC curve of the Weak Classifier Value;The Weak Classifier is obtained using the classification thresholds to any instruction in the specified portions sample set of the training sample set Practice the classification results of sample;It is carried out based on weight of the classification results to any training sample in the multiple training sample Adjustment;After iteration, the Weak Classifier that iteration each time obtains is integrated to obtain two classifiers.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description Module may or may not be physically separated, can be each module when implementing this specification example scheme Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.

Claims (15)

1. a kind of training method of two classifiers, which comprises
It is iterated processing using following steps, until the number of iterations reaches preset frequency threshold value:
It is trained using the learning algorithm and training sample set of setting, obtains Weak Classifier, the training sample concentration includes Multiple training samples, any training sample in the multiple training sample have weight;
The classification thresholds of the Weak Classifier are determined based on Receiver Operating Characteristics' ROC curve of the Weak Classifier;
The Weak Classifier is obtained using the classification thresholds to any in the specified portions sample set of the training sample set The classification results of training sample;
It is adjusted based on weight of the classification results to any training sample in the multiple training sample;
After iteration, the Weak Classifier that iteration each time obtains is integrated to obtain two classifiers.
2. according to the method described in claim 1, the ROC curve based on the Weak Classifier determines the Weak Classifier Classification thresholds, comprising:
For each data point on the ROC curve of the Weak Classifier, calculate between the data point and specified coordinate point Distance, wherein the ordinate of orthogonal axes value of the specified coordinate point is specified coverage rate, the horizontal axis coordinate value of the specified coordinate point It subtracts to specify for 1 and bothers rate;
It determines and gives directions the smallest data point of the distance between coordinate points;
The classification thresholds of the Weak Classifier are determined based on the data point determined.
3. according to the method described in claim 1, the ROC curve based on the Weak Classifier determines the Weak Classifier Classification thresholds, comprising:
For each data point on the ROC curve of the Weak Classifier, sat using the longitudinal axis of the set algorithm to the data point Scale value and horizontal axis coordinate value carry out operation;
Determine the maximum data point of operation result;
The classification thresholds of the Weak Classifier are determined based on the data point determined.
4. according to the method described in claim 1, the ROC curve based on the Weak Classifier determines the Weak Classifier Classification thresholds, comprising:
The sample score of any training sample in the multiple training sample is calculated using the Weak Classifier, and based on described Sample score determines the training sample, using determine result as whether for the sample execute the event of specifying according to According to;
The density function for estimating the specified index of the multiple training sample, using the density function of the specified index as ROC Curve Dynamic gene, the specified index reflect the implementation effect of the specified event;
The ROC curve of the Weak Classifier is adjusted using the ROC curve Dynamic gene, the multiple training sample;
The classification thresholds of the Weak Classifier are determined based on ROC curve adjusted.
5. according to the method described in claim 1, the method also includes:
After iteration, the present weight of any training sample in the multiple training sample is exported.
6. according to the method described in claim 1, the method also includes:
Any test sample that test sample is concentrated inputs two classifier, and the sample for obtaining any test sample obtains Point.
7. according to the method described in claim 1, the learning algorithm of the setting is at least following one of them:
Support vector machines algorithm, logistic regression algorithm.
8. a kind of training device of two classifiers, described device include:
Training module is trained for the learning algorithm using setting with training sample set, obtains Weak Classifier, the training It include multiple training samples in sample set, any training sample in the multiple training sample has weight;
Determining module, for determining the classification thresholds of the Weak Classifier based on the ROC curve of the Weak Classifier;
Categorization module, for obtaining specified portions sample of the Weak Classifier using the classification thresholds to the training sample set Book concentrates the classification results of any training sample;
Module is adjusted, for carrying out based on weight of the classification results to any training sample in the multiple training sample Adjustment;
The training module, the determining module, the categorization module and the adjustment module, which cooperate, to be realized at iteration Reason, until meeting preset iteration stopping condition;
Module is integrated, for being integrated to obtain two classifiers to the Weak Classifier that iteration each time obtains after iteration.
9. device according to claim 8, the determining module include:
First computational submodule, for calculating the data for each data point on the ROC curve of the Weak Classifier The distance between point and specified coordinate point, wherein the ordinate of orthogonal axes value of the specified coordinate point is specified coverage rate, described specified The horizontal axis coordinate value of coordinate points, which subtracts to specify for 1, bothers rate;
First data point determines submodule, for determining the smallest data point of the distance between specified coordinate point;
First threshold determines submodule, for determining the classification thresholds of the Weak Classifier based on the data point determined.
10. device according to claim 8, the determining module include:
Second computational submodule, for utilizing set algorithm pair for each data point on the ROC curve of the Weak Classifier The ordinate of orthogonal axes value and horizontal axis coordinate value of the data point carry out operation;
Second data point determines submodule, for determining the maximum data point of operation result;
Second threshold determines submodule, for determining the classification thresholds of the Weak Classifier based on the data point determined.
11. device according to claim 10, the determining module include:
Third computational submodule, for calculating any training sample in the multiple training sample using the Weak Classifier Sample score, and the training sample is determined based on the sample score, result will be determined as whether for described Sample executes the foundation of specified event;
Dynamic gene determines submodule, the density function of the specified index for estimating the multiple training sample, by the finger The density function of index is determined as ROC curve Dynamic gene, and the specified index reflects the implementation effect of the specified event;
Curve adjusting submodule, for utilizing the ROC curve Dynamic gene, the multiple training sample to the Weak Classifier ROC curve be adjusted;
Third threshold value determines submodule, for determining the classification thresholds of the Weak Classifier based on ROC curve adjusted.
12. device according to claim 8, described device further include:
Output module, for exporting the present weight of any training sample in the multiple training sample after iteration.
13. device according to claim 8, described device further include:
Sample points calculating module, any test sample for concentrating test sample input two classifier, obtain institute State the sample score of any test sample.
14. device according to claim 8, the learning algorithm of the setting is at least following one of them:
SVM algorithm, logistic regression algorithm.
15. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, wherein the processor realizes method as described in any one of claim 1 to 7 when executing described program.
CN201810658424.5A 2018-06-25 2018-06-25 A kind of training method, device and the computer equipment of two classifiers Pending CN109086791A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810658424.5A CN109086791A (en) 2018-06-25 2018-06-25 A kind of training method, device and the computer equipment of two classifiers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810658424.5A CN109086791A (en) 2018-06-25 2018-06-25 A kind of training method, device and the computer equipment of two classifiers

Publications (1)

Publication Number Publication Date
CN109086791A true CN109086791A (en) 2018-12-25

Family

ID=64840138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810658424.5A Pending CN109086791A (en) 2018-06-25 2018-06-25 A kind of training method, device and the computer equipment of two classifiers

Country Status (1)

Country Link
CN (1) CN109086791A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339337A (en) * 2019-12-18 2020-06-26 贵州智诚科技有限公司 Method for labeling penalty treatment based on road traffic law-violation behaviors
CN111401391A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Data mining method and device and computer readable storage medium
WO2021012220A1 (en) * 2019-07-24 2021-01-28 东莞理工学院 Evasion attack method and device for integrated tree classifier
CN113869342A (en) * 2020-06-30 2021-12-31 微软技术许可有限责任公司 Mark offset detection and adjustment in predictive modeling
WO2023071535A1 (en) * 2021-10-29 2023-05-04 齐鲁工业大学 Flow field feature extraction method and apparatus based on machine learning, and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401391A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Data mining method and device and computer readable storage medium
CN111401391B (en) * 2019-01-02 2024-05-07 中国移动通信有限公司研究院 Data mining method, device and computer readable storage medium
WO2021012220A1 (en) * 2019-07-24 2021-01-28 东莞理工学院 Evasion attack method and device for integrated tree classifier
CN111339337A (en) * 2019-12-18 2020-06-26 贵州智诚科技有限公司 Method for labeling penalty treatment based on road traffic law-violation behaviors
CN113869342A (en) * 2020-06-30 2021-12-31 微软技术许可有限责任公司 Mark offset detection and adjustment in predictive modeling
WO2023071535A1 (en) * 2021-10-29 2023-05-04 齐鲁工业大学 Flow field feature extraction method and apparatus based on machine learning, and storage medium

Similar Documents

Publication Publication Date Title
CN109086791A (en) A kind of training method, device and the computer equipment of two classifiers
US11594070B2 (en) Face detection training method and apparatus, and electronic device
CN108076154B (en) Application information recommendation method and device, storage medium and server
CN110222762A (en) Object prediction method, apparatus, equipment and medium
Kim et al. Target localization using ensemble support vector regression in wireless sensor networks
CN103460722B (en) Method, equipment and device for carrying out activity classification using the time scaling to the feature on the basis of the time
CN109214436A (en) A kind of prediction model training method and device for target scene
CN109788489B (en) Base station planning method and device
CN108141645A (en) Video emphasis detection with pairs of depth ordering
US20230267730A1 (en) Image abnormality detection model training
RU2597524C2 (en) Method and apparatus for classifying number of conditions of device
CN108090510A (en) A kind of integrated learning approach and device based on interval optimization
CN109214421A (en) A kind of model training method, device and computer equipment
CN107563410A (en) The sorting technique and equipment with multi-task learning are unanimously clustered based on topic categories
CN111079780A (en) Training method of space map convolution network, electronic device and storage medium
CN110956255A (en) Difficult sample mining method and device, electronic equipment and computer readable storage medium
CN104850489B (en) Mobile solution test system
CN110460401B (en) Cooperative spectrum sensing method based on matrix decomposition and particle swarm optimization clustering
EP3944149A1 (en) Data classification method, and classifier training method and system
CN110097098A (en) Data classification method and device, medium and electronic equipment based on base classifier
CN109154938A (en) Using discrete non-trace location data by the entity classification in digitized map
JP2018109906A (en) Image data creation program, image data creation device, and image data creation method
JP6199461B1 (en) Information processing apparatus, information processing method, and program
CN116306987A (en) Multitask learning method based on federal learning and related equipment
CN115131645A (en) Neural network training and application method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181225