Defect prediction method and apparatus
First Claim
1. A defect prediction method, comprising:
- selecting, by a processing device, a training attribute set from a pre-stored product fault record according to a target attribute, and combining the target attribute and the training attribute set into a training set, wherein the target attribute is a defect attribute of a historical faulty product;
generating, by the processing device, a classifier set according to the training set, wherein the classifier set comprises at least two tree classifiers;
predicting, by the processing device, a defect of a faulty product by using the classifier set as a prediction model;
acquiring, by the processing device, an error rate of generated K−
1 tree classifiers when a (K−
1)th tree classifier is generated;
acquiring, by the processing device, an error rate of generated K tree classifiers when a Kth tree classifier is generated, so that when a difference between the error rate of the K tree classifiers and the error rate of the K−
1 tree classifiers is less than a preset threshold, the K tree classifiers are combined to generate the classifier set, wherein K is an integer less than or equal to N, wherein N is an integer greater than or equal to 2;
generating, by the processing device, a prediction result in accordance with the predicted defect; and
notifying a user of the prediction result.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the present invention disclose a defect prediction method and apparatus, which relate to the data processing field, and implement accurate and quick locating of a defect in a faulty product. A specific solution is as follows: selecting a training attribute set from a pre-stored product fault record according to a target attribute, and combining the target attribute and the training attribute set into a training set, where the target attribute is a defect attribute of a historical faulty product; generating a classifier set according to the training set, where the classifier set includes at least two tree classifiers; and predicting a defect of a faulty product by using the classifier set as a prediction model. The present invention is used in a process of predicting a defect of a faulty product.
29 Citations
16 Claims
-
1. A defect prediction method, comprising:
-
selecting, by a processing device, a training attribute set from a pre-stored product fault record according to a target attribute, and combining the target attribute and the training attribute set into a training set, wherein the target attribute is a defect attribute of a historical faulty product; generating, by the processing device, a classifier set according to the training set, wherein the classifier set comprises at least two tree classifiers; predicting, by the processing device, a defect of a faulty product by using the classifier set as a prediction model; acquiring, by the processing device, an error rate of generated K−
1 tree classifiers when a (K−
1)th tree classifier is generated;acquiring, by the processing device, an error rate of generated K tree classifiers when a Kth tree classifier is generated, so that when a difference between the error rate of the K tree classifiers and the error rate of the K−
1 tree classifiers is less than a preset threshold, the K tree classifiers are combined to generate the classifier set, wherein K is an integer less than or equal to N, wherein N is an integer greater than or equal to 2;generating, by the processing device, a prediction result in accordance with the predicted defect; and notifying a user of the prediction result. - View Dependent Claims (2, 3, 4, 5, 8)
-
-
6. A defect prediction method, comprising:
-
selecting, by a processing device, a training attribute set from a pre-stored product fault record according to a target attribute, and combining the target attribute and the training attribute set into a training set, wherein the target attribute is a defect attribute of a historical faulty product; generating, by the processing device, a classifier set according to the training set, wherein the classifier set comprises at least two tree classifiers; predicting, by the processing device, a defect of a faulty product by using the classifier set as a prediction model; wherein the training set comprises M training units, wherein M is an integer greater than or equal to 1, and each training unit comprises one target attribute and one training attribute set; wherein generating a classifier set according to the training set comprises; selecting a first training subset from the training set, generating, according to a preset policy, a first tree classifier corresponding to the first training subset, selecting a second training subset from the training set, generating, according to the preset policy, a second tree classifier corresponding to the second training subset, selecting an Nth training subset from the training set, wherein the Nth training subset comprises M′
training units, and M′
is less than or equal to M,generating, according to the preset policy, an Nth tree classifier corresponding to the Nth training subset, wherein N is an integer greater than or equal to 2, and combining N tree classifiers to generate the classifier set; wherein after generating, according to the preset policy, an Nth tree classifier corresponding to the Nth training subset, the method further comprises; selecting an N′
th training subset from the training set, wherein an intersection set of the N′
th training subset and the Nth training subset is empty, and the N′
th training subset comprises at least one training unit,acquiring a false prediction rate of the Nth tree classifier according to the N′
th training subset, andacquiring a weight of the Nth tree classifier according to the false prediction rate of the Nth tree classifier; generating, by the processing device, a prediction result in accordance with the predicted defect; and notifying a user of the prediction result. - View Dependent Claims (7)
-
-
9. A defect prediction apparatus, comprising:
-
a processor; memory coupled to the processor, the memory comprising instructions that, when executed by the processor, cause the defect prediction apparatus to; select a training attribute set from a pre-stored product fault record according to a target attribute, and combine the target attribute and the training attribute set into a training set, wherein the target attribute is a defect attribute of a historical faulty product, generate a classifier set according to the training set, wherein the classifier set comprises at least two tree classifiers, predict a defect of a faulty product by using the classifier set as a prediction model, acquire an error rate of generated K−
1 tree classifiers when a (K−
1)th tree classifier is generated,acquire an error rate of generated K tree classifiers when a Kth tree classifier is generated, so that when a difference between the error rate of the K tree classifiers and the error rate of the K−
1 tree classifiers is less than a preset threshold, the K tree classifiers are combined to generate the classifier set, wherein K is an integer less than or equal to N, wherein N is an integer greater than or equal to 2;generate a prediction result in accordance with the predicted defect; and notify a user of the prediction result. - View Dependent Claims (10, 11, 12, 13, 16)
-
-
14. A defect prediction apparatus, comprising:
-
a processor; memory coupled to the processor, the memory comprising instructions that, when executed by the processor, cause the defect prediction apparatus to; select a training attribute set from a pre-stored product fault record according to a target attribute, and combine the target attribute and the training attribute set into a training set, wherein the target attribute is a defect attribute of a historical faulty product, generate a classifier set according to the training set, wherein the classifier set comprises at least two tree classifiers, and predict a defect of a faulty product by using the classifier set as a prediction model; wherein the training set comprises M training units, wherein M is an integer greater than or equal to 1, and each training unit comprises one target attribute and one training attribute set; and the memory further comprises instructions that, when executed by the processor, cause the defect prediction apparatus to; select a first training subset from the training set, generate, according to a preset policy, a first tree classifier corresponding to the selected first training subset, select a second training subset from the training set, generate, according to the preset policy, a second tree classifier corresponding to the selected second training subset, select an Nth training subset from the training set, wherein the Nth training subset comprises M′
training units, and M′
is less than or equal to M,generate, according to the preset policy, an Nth tree classifier corresponding to the selected Nth training subset, wherein N is an integer greater than or equal to 2, combine N tree classifiers to generate the classifier set, select an N′
th training subset from the training set after generation of an Nth tree classifier corresponding to the Nth training subset, wherein an intersection set of the N′
th training subset and the Nth training subset is empty, and the N′
th training subset comprises at least one training unit,acquire a false prediction rate of the Nth tree classifier according to the N′
th training subset, andacquire a weight of the Nth tree classifier according to the acquired false prediction rate of the Nth tree classifier; generate a prediction result in accordance with the predicted defect; and notify a user of the prediction result. - View Dependent Claims (15)
-
Specification