Association rule mining method, device and storage medium
Through the maximum expectation algorithm and score function calculation, the association rule dictionary is generated and filtered, which solves the problems of the existing technology in processing category information and the number of missing elements, realizes the effective mining of cross-category association rules, and improves the relevance and accuracy of the rules. accuracy.
Patent Information
- Application Number
- CN202210103069.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-01-27
AI Technical Summary
Existing association rule mining methods are ineffective when processing data containing category information, and cannot effectively mine association rules containing the number of missing elements, resulting in the generation of irrelevant rules and the inability to extract multiple elements from data with weak signals. Association rules.
Using statistical methods, the maximum expectation algorithm and score function calculation are used to generate an initial association rule dictionary, delete rules of the same category with a length greater than 1, estimate the true probability value, calculate the score function, and loop pruning until the score function reaches the threshold to obtain the span Dictionary of category association rules to solve the problem of missing number of elements.
It realizes the output of cross-category association rules from complex data, improves the relevance and accuracy of association rules, reduces the amount of calculation, and is suitable for e-commerce, bioinformatics, social sciences, medicine and other fields.
Smart Images

Figure CN114625776B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data mining, and in particular to a method, device and storage medium for mining association rules. Background Art
[0002] With the rapid popularization of the Internet, databases in various application fields store massive amounts of data, including text data, image data, voice data, etc. Data mining technology can be used to extract potential and valuable knowledge from massive data. The extracted knowledge includes concepts, rules, and laws. Association rule mining (Association Rule Mining / Association Pattern Discovery) is one of the important directions of data mining research. It reflects the relationship between things and has a wide range of applications in e-commerce, bioinformatics, social sciences, medicine, and other fields. A typical application of association rules is market basket analysis, which is to analyze the products in the customer's shopping basket, explore the correlation between products, and achieve intelligent recommendations. In the field of bioinformatics, by studying the amino acids that synthesize proteins in different tissue structures of organisms, we can find amino acid combinations with strong correlations, analyze the functions of multiple amino acid combinations, and further decompose proteins into functional modules of multiple amino acid combinations; in the field of social sciences, people use journal article data to analyze the cooperation between different researchers in specific research fields; in the field of medicine, researchers need to mine the correlation between different symptoms from a large number of electronic medical records (EMRs, Electronic Medical Records), determine whether certain symptom combinations are complications, or mine the correlation between different drugs, determine whether certain drug combinations interact, or mine the correlation between symptoms and drugs for auxiliary diagnosis, etc. Effective association rule mining methods can handle larger and more complex data, and the mined association rules have higher application value.
[0003] The existing association rule mining methods are mainly some model-free fast algorithms in the computer field, such as Apriori algorithm, Elcat algorithm, and FP-Growth algorithm. These model-free algorithms will generate some irrelevant rules, and cannot effectively mine association rules containing multiple elements from data with weak signals. Some researchers have also proposed some probability-based generation model methods, such as the Theme Dictionary Model (TDM), which regards the association rules composed of some elements as themes, and extracts themes from the theme dictionary to form data records. However, TDM is not suitable for effectively mining association rules from the following two types of data:
[0004] The first type of data contains the category information of elements, such as journal data contains two categories: title and author, and EMR data contains two categories: symptoms and prescriptions. Since the traditional subject dictionary model ignores this category information, most of the mined association rules only contain elements of the same category.
[0005] In the second type of data, each record can only observe whether an element appears, and the number of elements is missing, such as the prescription dosage of EMR data. Therefore, it is urgent to propose new methods to mine the association rules of complex data to solve such practical problems. Summary of the invention
[0006] The present invention uses statistical methods to output cross-category association rules from complex data, and has application value in e-commerce, bioinformatics, social sciences, medicine and other fields. The technical solution adopted by the present invention is as follows:
[0007] A method for mining association rules, for obtaining cross-category association rules, comprising:
[0008] Given the maximum length of the association rule, the minimum frequency of occurrence of the association rule, and the observation data containing n samples For observational data Generate initial associativity rule dictionary and from the initial associativity rule dictionary Delete the association rules from the same category whose length is greater than 1, and obtain the initial screening association rule dictionary
[0009] Execute the maximum expectation algorithm to estimate the initial screening association rule dictionary The true probability value θ of all association rules in
[0010] Calculate the score function ψ(α) of each association rule and select the score function from the initial screening association rule dictionary Remove the score function less than the threshold τ S All association rules are returned and the maximum expectation algorithm is executed, and the execution is repeated until the association rule dictionary is initially screened. The score function ψ(α) of each association rule is not less than the threshold τ S , obtain a dictionary of cross-category relevance rules.
[0011] Optionally, the Apriori algorithm is used to analyze the observed data. Generate initial associativity rule dictionary
[0012] Optionally, the length of the association rule refers to the number of elements of the association rule.
[0013] Optionally, the maximum expectation algorithm includes an E step and an M step, for the initial screening of the association rule dictionary Use formula 1 to solve the E step of the maximum expectation algorithm:
[0014]
[0015] Then use Formula 2 to solve the M step of the EM algorithm and get the estimated value θ (r+1) :
[0016] θ (r+1) =argmaxQ(θ|θ (r) ), (2)
[0017] in
[0018]
[0019] θ represents The true probability values of all association rules in ;
[0020] θ (r) Represents the probability estimate of all association rules when the algorithm iterates to step r;
[0021] Ω i Represents the i-th observation data O i The decomposition set of corresponding association rules;
[0022] S is Ω i Any decomposition of
[0023] The decomposition is based on the observed data O i , by initially screening the associative rule dictionary The constructed association rule set, the sum of the element types in the decomposition is equal to the observed data O i The sum of the types of elements in , where if O i The number of elements in O is not missing, then the number of elements in each decomposition is only 1. i If the number of elements in is missing, the number of occurrences of each decomposed element is greater than or equal to 1.
[0024] Optionally, the structure of the decomposition set is made compact by setting a decomposition group, wherein the decomposition group means that if the subset S of the decomposition S * Satisfies any association rule α∈S * , there is no association rule β∈S * , so that And S and S * If the elements contained are of the same type, then S * To decompose the covering decomposition of S, define For all with S *The set of decompositions S containing the same elements is called a decomposition group. Represents the i-th observation data O i The corresponding decomposition group set of association rules, thus transforming the maximum expectation algorithm from Ω i Space conversion to space to calculate, that is:
[0025]
[0026] Optionally, the calculating the score function ψ(α) of each association rule includes:
[0027] For each association rule The score function ψ(α) is calculated using formula 3:
[0028]
[0029] in represents the probability set after removing the association rule α, and ψ(α) represents the log-likelihood ratio statistic after retaining the association rule α and removing the association rule α.
[0030] The present invention also provides a correlation rule mining device, comprising:
[0031] The association rule screening module is used to give the maximum length of the association rule, the minimum frequency of occurrence of the association rule, and the observation data containing n samples. For observational data Generate initial associativity rule dictionary and from the initial associativity rule dictionary Delete the association rules from the same category whose length is greater than 1, and obtain the initial screening association rule dictionary
[0032] Maximum expectation algorithm module, used to execute the maximum expectation algorithm to estimate the initial screening association rule dictionary The true probability value θ of all association rules in
[0033] A score function calculation module, used to calculate the score function ψ(α) of each association rule;
[0034] Pruning module, used to filter the association rule dictionary Remove the score function less than the threshold τ S All association rules are returned and the maximum expectation algorithm is executed, and the execution is repeated until the association rule dictionary is initially screened. The score function ψ(α) of each association rule is not less than the threshold τ S , obtain a dictionary of cross-category relevance rules.
[0035] Optionally, in the maximum expectation algorithm module, the maximum expectation algorithm includes an E step and an M step, for the initial screening of the association rule dictionary Use formula 1 to solve the E step of the maximum expectation algorithm:
[0036]
[0037] Then use Formula 2 to solve the M step of the EM algorithm and get the estimated value θ (r+1) :
[0038] θ (r+1) =argmaxQ(θ|θ (r) ), (2)
[0039] in
[0040]
[0041] θ represents The true probability values of all association rules in ;
[0042] θ (r) Represents the probability estimate of all association rules when the algorithm iterates to step r;
[0043] Ω i Represents the i-th observation data O i The decomposition set of corresponding association rules;
[0044] S is Ω i Any decomposition of
[0045] The decomposition is based on the observed data O i , by initially screening the associative rule dictionary The constructed association rule set, the sum of the element types in the decomposition is equal to the observed data O i The sum of the types of elements in , where if O i The number of elements in O is not missing, then the number of elements in each decomposition is only 1. i If the number of elements in is missing, the number of occurrences of each decomposed element is greater than or equal to 1;
[0046] In the maximum expectation algorithm module, the structure of the decomposition set is made compact by setting the decomposition group. The decomposition group means that if the subset S of S is decomposed * Satisfies any association rule α∈S * , there is no association rule S∈S * , so that And S and S * If the elements contained are of the same type, then S * To decompose the covering decomposition of S, define For all with S * The set of decompositions S containing the same elements is called a decomposition group. Represents the i-th observation data O i The corresponding decomposition group set of association rules, thus transforming the maximum expectation algorithm from Ω i Space conversion to space to calculate, that is:
[0047]
[0048] In the score function calculation module, the calculation of the score function ψ(α) of each association rule includes:
[0049] For each association rule The score function ψ(α) is calculated using formula 3:
[0050]
[0051] in represents the probability set after removing the association rule α, and ψ(α) represents the log-likelihood ratio statistic after retaining the association rule α and removing the association rule α.
[0052] The present invention also provides an electronic device, which includes a memory and a processor. The memory stores an association rule mining program, and when the association rule mining program is executed by the processor, the association rule mining method as described above is implemented.
[0053] The present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned association rule mining method is implemented.
[0054] The present invention obtains cross-category association rules containing only the length of 1 or greater than 1 through preliminary screening, and reconstructs the decomposition of the association rules into a decomposition group set, so that the decomposition set in the maximum expectation algorithm can be converted to the decomposition group set for calculation, thereby reducing the amount of calculation, and performing pruning processing according to the score function of each association rule, so as to obtain a cross-category association rule dictionary and solve the problem of the number of missing elements. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The above-mentioned features and technical advantages of the present invention will become clearer and easier to understand by describing its embodiments in conjunction with the following drawings.
[0056] Figure 1 Schematic diagram showing the steps of the association rule mining method according to an embodiment of the present application;
[0057] Figure 2 is a schematic diagram showing the hardware architecture of an electronic device according to an embodiment of the present application;
[0058] Figure 3 It is a module structure diagram representing the association rule mining program of the embodiment of the present application. DETAILED DESCRIPTION
[0059] The embodiments of the present invention will be described below with reference to the accompanying drawings. It will be appreciated by those skilled in the art that the described embodiments may be modified in various ways or combinations thereof without departing from the spirit and scope of the present invention. Therefore, the drawings and descriptions are illustrative in nature and are not intended to limit the scope of the claims. In addition, in this specification, the drawings are not drawn to scale and the same reference numerals represent the same parts.
[0060] A method for mining association rules, for obtaining cross-category association rules, comprises the following steps:
[0061] Step S1, given the maximum length τ of the association rule L , the minimum occurrence frequency of association rules τ F and observation data containing n samples Apriori algorithm is used to analyze the observed data Generate initial associativity rule dictionary if If there is an association rule from the same category with a length greater than 1, then the association rule is removed from , thereby obtaining the initial screening association rule dictionary
[0062] The length of the association rule is defined as the number of elements in the association rule. For example, if the association rule AB contains two elements, A and B, then the length is 2.
[0063] For example Lowercase letters and uppercase letters correspond to two categories respectively. The association rule a, b, ab, AB belong to the same category. If the length of ab, AB is greater than 1, then ab, AB are removed from Delete it.
[0064] Step S2, execute EM algorithm (maximum expectation algorithm) to estimate The true probability value θ of all association rules in the EM algorithm consists of two parts: the E step and the M step. For the initial screening of the association rule dictionary Use formula 1 to solve the E step of the EM algorithm:
[0065]
[0066] Then use Formula 2 to solve the M step of the EM algorithm and get the estimated value θ (r+1) :
[0067] θ (r+1) =argmaxQ(θ|θ (r) ), (2)
[0068] in
[0069]
[0070] θ represents The true probability values of all association rules in ;
[0071] θ (r) Represents the probability estimate of all association rules when the algorithm iterates to step r;
[0072] Ω i Represents the i-th observation data O i The decomposition set of corresponding association rules;
[0073] S is Ω i Any decomposition of .
[0074] The decomposition is based on the observed data O i , by initially screening the associative rule dictionary A set of association rules constructed, the sum of the element types in the decomposition is equal to the observed data O i The total number of element types in . In each decomposition, the number of element occurrences can be greater than or equal to 1, where if O i The number of elements in O is not missing, then the number of elements in each decomposition is only 1. i If the number of elements in is missing, each decomposed element is allowed to appear more than or equal to 1 times.
[0075] For example: Assume Observation data i ={a,B}, if O i If there are no missing elements in the decomposition, there are two decompositions {a,B} and {aB}, which constitute the decomposition set Ω. i ={{a,B},{aB}}, the number of occurrences of each element in the decomposition is 1; if O i If the number of elements in is missing, the number of occurrences of each decomposition element is allowed to be greater than or equal to 1, which corresponds to 5 decompositions Pa, B}, {aB}, {a, aB}, {B, aB}, {a, B, aB}, and these 5 decompositions constitute the decomposition set Ω i={{a,B},{aB},{a,aB},{B,aB},{a,B,aB}}. Regardless of whether the number of elements is missing, the number of elements in each decomposition is 2 and equal to O i The element type.
[0076] Among them, in the execution of the EM algorithm, since Q(θ|θ (r) ) involves the calculation of This item requires enumerating all possible decomposition sets of association rules Ω i In order to restore the quantity information in the missing data, as mentioned above, the number of occurrences of elements in the decomposition is allowed to be greater than or equal to 1, and the decomposition group is set to make the structure of the decomposition set more compact to reduce the amount of calculation. The details are as follows:
[0077] If a subset S of S * Satisfies any association rule α∈S * , there is no association rule β∈S * , so that And S and S * If the elements contained are of the same type, then S * is a covering decomposition of decomposition S. For example, a decomposition S is {a, B, aB}, and the subset S * is {aB}, then this subset S * is a covering decomposition of S.
[0078] Different decompositions S may correspond to the same covering decomposition S * , so define For S * The set of all decompositions induced by S is called the decomposition group, that is, all * The set of S containing elements of the same type is called a decomposition group. For example: Covering decomposition S * ={aB} induced four decompositions constitute the decomposition group
[0079] make Represents the i-th observation data O i The corresponding decomposition group set of association rules is calculated in the initial screening association rule dictionary θ (r) The observed data O is obtained under the condition i The probability of i Space conversion to space to calculate, that is:
[0080]
[0081] Step S3, calculate the score function ψ(α) of each association rule, and preliminarily screen the association rule dictionary Although it only contains cross-category association rules with a length of 1 or greater than 1, the number of these rules is very large and may be somewhat unbelievable, so it is necessary to screen the association rule dictionary Prune and remove untrusted ones. Specifically, for each association rule The score function ψ(α) is calculated using the following formula 3:
[0082]
[0083] in represents the probability set after removing the association rule α, and ψ(α) represents the log-likelihood ratio statistic after retaining the association rule α and removing the association rule α.
[0084] Step S4: Preliminary screening of the association rule dictionary Perform pruning, that is, remove The score function is less than the threshold τ S Each time you delete some association rules, you will initially screen the association rule dictionary. As the value of θ decreases, the number of decompositions will also decrease. It is necessary to update the EM algorithm in step 2 to re-estimate the true probability value θ, and the cycle continues until No more pruning can be performed.
[0085] Step S5, obtaining a cross-category association rule dictionary.
[0086] The present application also provides an electronic device, referring to Figure 2 , which is a schematic diagram of the hardware architecture of an embodiment of the electronic device of the present application. In this embodiment, the electronic device 2 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. For example, it can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a server, etc. Figure 2As shown, the electronic device 2 at least includes, but is not limited to, a memory 21 and a processor 22 that are communicatively connected to each other. Wherein: the memory 21 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 21 can be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2. In other embodiments, the memory 21 can also be an external storage device of the electronic device 2, such as a plug-in hard disk equipped on the electronic device 2, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 21 can also include both the internal storage unit of the electronic device 2 and its external storage device. In this embodiment, the memory 21 is generally used to store the operating system and various application software installed in the electronic device 2, such as the association rule mining program code, etc. In addition, the memory 21 can also be used to temporarily store various data that have been output or will be output.
[0087] The processor 22 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 22 is generally used to control the overall operation of the electronic device 2, such as executing control and processing related to data interaction or communication with the electronic device 2. In this embodiment, the processor 22 is used to run the program code stored in the memory 21 or process data, such as running the association rule mining program.
[0088] Optionally, the electronic device 2 may further include a display, which may also be referred to as a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (OLED) display. The display is used to display information processed in the electronic device 2 and to display a visual user interface.
[0089] It should be pointed out that Figure 2 Only the electronic device 2 having components 21 , 22 is shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0090] The memory 21 including a readable storage medium may include an operating system, an association rule mining program 30, etc. When the processor 22 executes the association rule mining program 30 in the memory 21, the steps S1 to S5 described above are implemented, which will not be repeated here. In this embodiment, the association rule mining program 30 stored in the memory 21 can be divided into one or more program modules, and the one or more program modules are stored in the memory 21 and can be executed by one or more processors (the processor 22 in this embodiment) to complete the present application. For example, Figure 3 A schematic diagram of the association rule mining program module is shown. In this embodiment, the association rule mining program 30 can be divided into an association rule initial screening module 301, a maximum expectation algorithm module 302, a score function calculation module 303, and a pruning module 304. The program module referred to in this application refers to a series of computer program instruction segments that can perform specific functions, which is more suitable for describing the execution process of the association rule mining program in the electronic device 2 than a program.
[0091] The relevance rule initial screening module 301 is used to set the maximum length τ of the given relevance rule. L , the minimum occurrence frequency of association rules τ F and observation data containing n samples Apriori algorithm is used to analyze the observed data Generate initial associativity rule dictionary if If there is an association rule from the same category with a length greater than 1, then the association rule is removed from , thereby obtaining the initial screening association rule dictionary
[0092] The length of the association rule is defined as the number of elements in the association rule. For example, if the association rule AB contains two elements, A and B, then the length is 2.
[0093] For example Lowercase letters and uppercase letters correspond to two categories respectively. The association rule a, b, ab, AB belong to the same category. If the length of ab, AB is greater than 1, then ab, AB are removed from Delete it.
[0094] Maximum expectation algorithm module 302, used to execute EM algorithm (maximum expectation algorithm) to estimate The true probability value θ of all association rules in the EM algorithm consists of two parts: the E step and the M step. For the initial screening of the association rule dictionary Use formula 1 to solve the E step of the EM algorithm:
[0095]
[0096] Then use Formula 2 to solve the M step of the EM algorithm and get the estimated value θ (r+1) :
[0097] θ (r+1) =argmaxQ(θ|θ (r) ), (2)
[0098] in
[0099]
[0100] θ represents The true probability values of all association rules in ;
[0101] θ (r) Represents the probability estimate of all association rules when the algorithm iterates to step r;
[0102] Ω i Represents the i-th observation data O i The decomposition set of corresponding association rules;
[0103] S is Ω i Any decomposition of .
[0104] The decomposition is based on the observed data O i , by initially screening the associative rule dictionary A set of association rules constructed, the sum of the element types in the decomposition is equal to the observed data O i The total number of element types in . In each decomposition, the number of element occurrences can be greater than or equal to 1, where if O i The number of elements in O is not missing, then the number of elements in each decomposition is only 1. i If the number of elements in is missing, each decomposed element is allowed to appear more than or equal to 1 times.
[0105] For example: Assume Observation data i ={a,B}, if O i If there are no missing elements in the decomposition, there are two decompositions {a,B} and {aB}, which constitute the decomposition set Ω. i ={{a,B},{aB}}, the number of occurrences of each element in the decomposition is 1; if O i If the number of elements in is missing, the number of occurrences of each decomposition element is allowed to be greater than or equal to 1, which corresponds to 5 decompositions {a, B}, {aB}, {a, aB}, {B, aB}, {a, B, aB}, and these 5 decompositions constitute the decomposition set Ω i={{a,B},{aB},{a,aB},{B,aB},{a,B,aB}}. Regardless of whether the number of elements is missing, the number of elements in each decomposition is 2 and equal to O i The element type.
[0106] Among them, in the execution of the EM algorithm, since Q(θ|θ (r) ) involves the calculation of This item requires enumerating all possible decomposition sets of association rules Ω i In order to restore the quantity information in the missing data, as mentioned above, the number of occurrences of elements in the decomposition is allowed to be greater than or equal to 1, and the decomposition group is set to make the structure of the decomposition set more compact to reduce the amount of calculation. The details are as follows:
[0107] If a subset S of S * Satisfies any association rule α∈S * , there is no association rule β∈S * , so that And S and S * If the elements contained are of the same type, then S * is a covering decomposition of decomposition S. For example, a decomposition S is {a, B, aB}, and the subset S * is {aB}, then this subset S * is a covering decomposition of S.
[0108] Different decompositions S may correspond to the same covering decomposition S * , so define For S * The set of all decompositions induced by S is called the decomposition group, that is, all * The set of S containing elements of the same type is called a decomposition group. For example: Covering decomposition S * ={aB} induced four decompositions constitute the decomposition group
[0109] make Represents the i-th observation data O i The corresponding decomposition group set of association rules is calculated in the initial screening association rule dictionary θ (r) The observed data O is obtained under the condition i The probability of i Space conversion to space to calculate, that is:
[0110]
[0111] The score function calculation module 303 is used to calculate the score function ψ(α) of each association rule and preliminarily screen the association rule dictionary. Although it only contains cross-category association rules with a length of 1 or greater than 1, the number of these rules is very large and may be somewhat unbelievable, so it is necessary to screen the association rule dictionary Prune and remove untrusted ones. Specifically, for each association rule The score function ψ(α) is calculated using the following formula 3:
[0112]
[0113] in represents the probability set after removing the association rule α, and ψ(α) represents the log-likelihood ratio statistic after retaining the association rule α and removing the association rule α.
[0114] Pruning module 304, used to preliminarily screen the associative rule dictionary Perform pruning, that is, remove The score function is less than the threshold τ S Each time you delete some association rules, you will initially screen the association rule dictionary. As the value of θ decreases, the number of decompositions will also decrease. It is necessary to update the EM algorithm in step 2 to re-estimate the true probability value θ, and the cycle continues until No more pruning can be performed in , and a dictionary of cross-category association rules is obtained.
[0115] In addition, the present invention also provides an association rule mining device, including the above-mentioned association rule initial screening module 301, maximum expectation algorithm module 302, score function calculation module 303, and pruning module 304. The functions performed by each module are roughly the same as the above-mentioned association rule mining method and the specific implementation method of the electronic device 2, and will not be repeated here.
[0116] In addition, the embodiment of the present application also proposes a computer-readable storage medium, which can be non-volatile or volatile, and can be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, etc. The computer-readable storage medium includes an association rule mining program, etc. When the association rule mining program 30 is executed by the processor 22, the steps described in the above method are implemented. The specific implementation of the computer-readable storage medium of the present application is roughly the same as the specific implementation of the above association rule mining method and the electronic device 2, and will not be repeated here.
[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for mining association rules, for obtaining cross-category association rules, characterized in that: include: Given the maximum length of the association rule, the minimum frequency of occurrence of the association rule, and the observation data containing n samples For observational data Generate initial associativity rule dictionary and from the initial associativity rule dictionary Delete the association rules from the same category whose length is greater than 1, and obtain the initial screening association rule dictionary The observed data is journal data, which includes two categories: title and author; Execute the maximum expectation algorithm to estimate the initial screening association rule dictionary The true probability value θ of all association rules in Calculate the score function ψ(α) of each association rule and select the score function from the initial screening association rule dictionary Remove the score function less than the threshold τ S All association rules are returned and the maximum expectation algorithm is executed, and the execution is repeated until the association rule dictionary is initially screened. The score function ψ(α) of each association rule is not less than the threshold τ S , obtain a dictionary of cross-category relevance rules for analyzing the relevance of titles and authors, The maximum expectation algorithm includes the E step and the M step. For the initial screening of the association rule dictionary Use formula 1 to solve the E step of the maximum expectation algorithm: Then use Formula 2 to solve the M step of the EM algorithm and get the estimated value θ( r+ 1): i (r+ 1 ) =argmax Q(θ|θ ( r ) ),(2) in θ represents The true probability values of all association rules in ; θ(r) represents the probability estimate of all association rules when the algorithm iterates to the rth step; Ω i Represents the i-th observation data O i The decomposition set of corresponding association rules; S is Ω i Any decomposition of The decomposition is based on the observed data O i , by initially screening the associative rule dictionary The constructed association rule set, the sum of the element types in the decomposition is equal to the observed data O i The sum of the types of elements in , where if O i The number of elements in O is not missing, then the number of elements in each decomposition is only 1. i If the number of elements in is missing, the number of occurrences of each decomposed element is greater than or equal to 1. The structure of the decomposition set is made compact by setting a decomposition group, where the decomposition group means that if the subset S* of the decomposition S satisfies any association rule α∈S * , there is no association rule β∈S * , so that And S and S * If the elements contained are of the same type, then S * To decompose the covering decomposition of S, define For all with S * The set of decompositions S containing the same elements is called a decomposition group. Represents the i-th observation data O i The corresponding decomposition group set of association rules, thus transforming the maximum expectation algorithm from Ω i Space conversion to space to calculate, that is: The calculation of the score function ψ(α) of each association rule includes: For each association rule The score function ψ(α) is calculated using formula 3: in represents the probability set after removing the association rule α, and ψ(α) represents the log-likelihood ratio statistic after retaining the association rule α and removing the association rule α.
2. The association rule mining method according to claim 1, characterized in that: Apriori algorithm is used to analyze the observed data Generate initial associativity rule dictionary 3. The association rule mining method according to claim 1, characterized in that: The length of an affinity rule refers to the number of elements in the affinity rule.
4. A correlation rule mining device, characterized in that: include: The association rule screening module is used to give the maximum length of the association rule, the minimum frequency of occurrence of the association rule, and the observation data containing n samples. For observational data Generate initial associativity rule dictionary and from the initial associativity rule dictionary Delete the association rules from the same category whose length is greater than 1, and obtain the initial screening association rule dictionary The observed data is journal data, which includes two categories: title and author; Maximum expectation algorithm module, used to execute the maximum expectation algorithm to estimate the initial screening association rule dictionary The true probability value θ of all association rules in A score function calculation module, used to calculate the score function ψ(α) of each association rule; Pruning module, used to filter the association rule dictionary Remove the score function less than the threshold τ S All association rules of , return to execute the maximum expectation algorithm, and execute it in a loop until the association rule dictionary is initially screened The score function ψ(α) of each association rule is not less than the threshold τ S , obtain a dictionary of cross-category relevance rules for analyzing the relevance of titles and authors, In the maximum expectation algorithm module, the maximum expectation algorithm includes E step and M step. For the initial screening of the association rule dictionary Use formula 1 to solve the E step of the maximum expectation algorithm: Then use Formula 2 to solve the M step of the EM algorithm and get the estimated value θ( r+ 1): i (r+1) =argmax Q(θ|θ (r) ), (2) in θ represents The true probability values of all association rules in ; θ (r) Represents the probability estimate of all association rules when the algorithm iterates to step r; Ω i Represents the i-th observation data O i The decomposition set of corresponding association rules; S is Ω i Any decomposition of The decomposition is based on the observed data O i , by initially screening the associative rule dictionary The constructed association rule set, the sum of the element types in the decomposition is equal to the observed data O i The sum of the types of elements in , where if O i The number of elements in O is not missing, then the number of elements in each decomposition is only 1. i If the number of elements in is missing, the number of occurrences of each decomposed element is greater than or equal to 1; In the maximum expectation algorithm module, the structure of the decomposition set is made compact by setting the decomposition group. The decomposition group means that if the subset S of S is decomposed * Satisfies any association rule α∈S * , there is no association rule β∈S * , so that And S and S * If the elements contained are of the same type, then S * To decompose the covering decomposition of S, define For all with S * The set of decompositions S containing the same elements is called a decomposition group. Represents the i-th observation data O i The corresponding decomposition group set of association rules, thus transforming the maximum expectation algorithm from Ω i Space conversion to space to calculate, that is: In the score function calculation module, the calculation of the score function ψ(α) of each association rule includes: For each association rule The score function ψ(α) is calculated using formula 3: in represents the probability set after removing the association rule α, and ψ(α) represents the log-likelihood ratio statistic after retaining the association rule α and removing the association rule α.
5. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein a correlation rule mining program is stored in the memory, and when the correlation rule mining program is executed by the processor, the correlation rule mining method according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the association rule mining method according to any one of claims 1 to 3 is implemented.
