Research Article

Equipment Quality Information Mining Method Based on Improved Apriori Algorithm

Algorithm 3

The process of function conf_calculate called in Algorithm 2.
Step1 make
Step2 extract the j-th subscript of the remaining subscripts in ind
Step3 save the extracted subscript, and make its corresponding item be one of the post rules, then connect the string of corresponding item name with stry
Step4 delete the extracted subscript in ind
Step5 if the number of subsequent rules is less than num, assign the value of ind to the formal parameter ind, the value of stry to the formal parameter stry, the value of j to the formal parameter index, then call function conf_calculate; Otherwise, turn to step6
Step6 connect the string of item names corresponding to all the remaining subscripts in ind and store them in strx
Step7 find the corresponding support count in B and Y according to the divided pre rule itemsets and post rule itemsets, then calculate the ratio to the total number of transactions separately to obtain the support supx and supy
Step8 calculate the confidence conf and the correlation measure lift, ,
Step9 if , make '=>' ' Support=' ' Confidence=' ' Lift=' , call function fprintf to write str into text document; Otherwise turn to step10
Step10 make , if , turn to Step2; Otherwise end