International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 2- January 2016 An Efficient Frequent Pattern Generation with Utility and Flag Matrix Model Mutyala Narendra1, Boddu Nanda Kishore2 1,2 Final M.Tech Student1, Assistant professor 2 Dept of CSE, Avanthi Institute of Engineering and Technology, Tamaram, Makavarapalem, Visakhapatnam, Andhrapradesh, India. Abstract: Extraction of association rules from set of patterns is always an interesting research issue in the field of knowledge and data engineering. In this paper we are proposing an efficient comparative analysis between FP growth, utility based pattern generation approach and flag matrix based pattern generation . In this approach we will reduce the number of times of database scans and the space and time complexity to generate frequent item sets. The flag matrix approach is more efficient than the FP growth and utility pattern matching techniques. Every pattern mining algorithm generates same patterns but time complexity and optimality of patterns is different. I.INTRODUCTION Frequent pattern mining consists of developing data mining algorithms to discover interesting and unexpected and useful patterns in databases. Frequent pattern mining algorithms are applied on different kind of data such as transactional databases, graphs, streams, spatial data etc. Frequent pattern mining algorithms are designed to find the different kind of patterns like sub graphs, sequence patterns, rules, lattices etc. There are following examples for patter mining: The most popular algorithm for pattern mining is Apriori algorithm. It is mainly designed for applying on transactional databases to get the pattern in transactions. A transaction is defined as set of different items. Apriori takes two inputs. One is minsup threshold which is set by user and other is transactional database which consists of transactions. Apriori gives output as frequent Itemsets [1] We are proposing an association rule based approach to find association between entities or URL to identify the frequent patterns for an input query. Various approaches available for pattern based techniques like Apriori, Utility, Apriori TD, FP growth etc. Apriori is one of the simple frequent pattern generation algorithm but main drawbacks of this approach is multiple dataset scan and candidate set of each and every frequent item set, increases the time complexity when item set or set of URLs are more, so FP growth algorithm is one of the SSN: 2231-5381 efficient algorithm to find frequently visited URLs by constructing FP tree and finds frequent patterns from FP tree The sequence database is the combination of sequences. The sequential rule has the form XY where X and Y are two distinct non empty sets of items. The meaning of this rule is the item of X follows by Y in order and vice versa. The goal of sequential rule mining is to discover all sequential rules which is having thresholds given by the user named as “minsup” and “minsconf”. This is called Rule Growth Algorithm. Association Rule Mining is the procedure to find frequent patterns, correlations and associations from data sets that are found in different databases like relational databases, transactional databases and other form of data repositories. The main applications of association rule mining are as follows: Basket Data Mining: It is used to analyze the association of purchased items in a basket Cross Marketing: It is used to work with other businesses and complement of your own. Catalog Design: It is used for the selection of items in business of catalog are designed to complement each other. II.RELATED WORK Even though various traditional approaches available for generation of frequent patterns and association rules, they are not optimal in terms of time complexity due to approaches of candidate set generation, multiple database scans ,two time scan and other issues. Only few approaches can identify the internal and optimal patterns from the frequent patterns apart from the regular frequent patterns. The main disadvantages of the traditional approaches are, candidate set generation is difficult if the size of the database is huge and Multiple database scans are need to generate frequent items sets An association rule is an implication or if-then-rule which is supported by data. The motivation for the http://www.ijettjournal.org Page 87 International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 2- January 2016 development of association rules is market basket analysis which deals with the contents of point-ofsale transactions of large retailers. A typical association rule resulting from such a study could be \90 percent of all customers who buy bread and butter also buy milk". Insights into customer behaviour may also be obtained through customer surveys, but the analysis of the transactional data has the advantage of being much cheaper and covering all current customers. Compared to customer surveys, the analysis of transactional data does have some severe limitations, however. For example, point-of-sale data typically does not contain any information about personal interests, age and occupation of customers. Nonetheless, market basket analysis can provide new insights into customer behaviour and has led to higher pro_ts through better customer relations, customer retention, better product placements, product development and fraud detection. Itemsets and Associations: In this section a formal mathematical model is derived to describe itemsets and associations to provide a framework for the discussion of the apriori algorithm. In order to apply ideas from market basket analysis to other areas one needs a general description of market baskets which can equally describe collections of medical services received by a patient during an episode of care, subsequences of amino acid sequences of a protein, and collections or words or concepts used on web pages. In this general description the items are numbered and a market basket is represented by an indicator vector. Utility mining is defined as the identification of Itemsets with high utility. Utility can be measured as cost, price and other expressions with which user needs The objective of Utility mining is to find utility Itemsets having high or greater or equal to minimum utility thresholds.[3] Boolean matrix is an integer matrix in which each element is 0 and 1. It is also called logical matrix. The number of m*n binary matrices is 2 mn. . Examples of Boolean matrix are incidence matrix, permutation matrix, bi-adjacency matrix. The game rules can be checked by using Boolean matrix. Modular arithmetic operation can be performed in binary matrices. The matrix representation of equality relation is identity matrix. III.PROPOSED WORK We propose an efficient association rule mining approach with flag matrix representation with one time database scan. Algorithm need not scan the SSN: 2231-5381 database multiple times and no candidate set generations. It reduces the space and time complexity for generation of frequent patterns and association rules, for comparative analysis we generated rules through fp growth algorithm, utility and flag matrix representation and in the second phase frequent patterns can be forwarded to genetic algorithm for optimal pattern generation. Difficulty and time complexity in the candidate set generation was reduced by generating the flag matrix for the database and multiple database scans are reduced to one time scan of database FP growth algorithm is a two phase approach for generation of frequent patterns in first phase it constructs the fp tree and second phase it constructs the conditional tree for frequent pattern generation. In phase one ,algorithm reads one transaction at a time and create a branch wet sequence of nodes and edges, before creation of edge it checks for a path is any previously available with first element of the pattern, if it is found then increment the counter of the item and create one more branch from that node, we continue the process until the last transaction. Conditional pattern tree can be generated for each individual element and all possible combinations, traverse from the suffix nodes and gets all possible combinations and count with this start node and if it meets the minimum threshold then it can be taken as frequent item, otherwise it can be ignored. Utility Pattern Mining: Most of the frequent pattern mechanisms works on frequency of the item but not on the importance or utility of the item, utility growth model works based on utility of the item set.An item utility can be computed with product of item quantity and product and then integration of these products for all transactions can be taken as total utility ,if it meets the mininmum threshold value it can be taken as utility item. For finding the utility of n item set we consider the frequent item set,computes sub item utilities individual with respect to one transction and continues the process until it reaches the final transaction then only satisfied patterns can be considered. Let I={i1, i2, i3, . . . , in} be a set of items and DB be a database composed of a utility table and a transaction table. Each item in Ihas a utility value in the utility table. Each transaction T in the transaction table has a unique identifier (tid) and is a subset of I, in which each item is associated with a count value. An itemset is a subset of I and is called ak-itemset if it contains k items. http://www.ijettjournal.org Page 88 International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 2- January 2016 Definition 1.The external utility of item i, denoted as eu(i), is the utility value of i in the utility table of DB. Definition 2.The internal utility of item i in transaction T, denoted as iu(i, T), is the count value associated with i in T in the transaction table of DB. Definition 3.The utility of item i in transaction T, denoted as u(i, T), is the product of iu(i, T) and eu(i), where u(i, T) = iu(i, T) × eu(i). eu(e) = 4, iu(e, T5) = 2, and u(e,T5)= iu(e, T5) × eu(e) = 2 × 4 = 8. Definition 4.The utility of itemset X in transaction T, denoted as u(X, T), is the sum of the utilities of all the items in X Σ in T in which X is contained, where u(X, T) = I ∈ X∧ X⊆T u(i; T). Definition 5.The utility of itemset X, denoted as u(X), is the sum of the utilities of X in all the transactions containing X in DB, where u(X) = Σ T∈ DB∧ X⊆T u(X; T). Flag Matrix: Flag matrix is a novel technique for generation of frequent patterns, it reduces the traditional complexity issues like Candidate set generation and multiple data base scans by constructing a simple matrix between transactions and items or data objects here frequent items can be generated based on flag values if any item exists specific transaction then it can be set to 1 else 0. Algorithm for Flag Matrix : 1: While (Patterns available) 2: Load the individual patterns Pifrom transaction table 3: Generate a matrix with l rows and m columns Where „l‟ is item in transaction and „m „ is id of the transaction 4: if corresponding item „l‟ isavailableinspecific transaction „m‟ then Set intersection (l,m)=‟1‟ else set to‟ 0‟. 5: Continuesteps 2 to 5 completed until all transactions Now we can extract frequent patterns from the matrix, to extract frequent 1 itemset, initially count number of ones in vertical columns with respect to item, if it SSN: 2231-5381 matches minimum threshold values then treat it as frequent item else ignore, continue same process for 2 itemset,check whether two items have „1‟ in their corresponding vertical columns then increment, continue until all transactions verified. If total count greater than threshold value then treat it as frequent item 1: Load item_set {I1,I2…In) and Initialize the count:=0 and final_counter :0 2: for i:=0 ;i< n ;i++ For j:=0 j<trans _size() ;j++ If intersection of (i,j)==1 then Count :=+1; Next If counter ==Ii .size_() then add items to list Next 3: Set minimum support count value (t) 4: for k=0;k<item_list_size ;k++ Ifitem_list[k].count >= t Then add to list of frequent items Next 5: return frequent pattern list Flag matrix can be generated based on the existence of the item with respect to transactions . It initially reads first transaction from the database ,for example it contains “a,b,c,d” ,in corresponding positions of matrix , item values can be set to „1‟ in corresponding transaction else „0‟ and consider second transaction “a,c,e”,set the corresponding item positions to „1‟ in second transaction and continue the process until all transactions placed in matrix representation.. IV. CONCLUSION We have been concluding our current research work with efficient frequent models,fp growth approach ignores the unnecessary overhead of candidate generations and multiple data base scans, but it is not suitable when data is large because traversing problem and complex while tree construction, utility based approach gives the utility of the item and items sets apart from frequency but it needs few scans. Flag matrix makes one time databases scan for generation of matrix, so need to scan the databases for frequent item sets because we can generate from matrix. http://www.ijettjournal.org Page 89 International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 2- January 2016 REFERENCES [1] S.J. Yen and Y.S. Lee, “Mining High Utility QuantitativeAssociation Rules.”Proc. Ninth Int‟l Conf. Data Warehousing andKnowledge Discovery (DaWaK), pp. 283-292, Sept. 2007. [2] R. Agrawal and R. Srikant, “Mining Sequential Patterns,” Proc.11th Int‟l Conf. Data Eng., pp. 3-14, Mar. 1995. [3] C.F. Ahmed, S.K. Tanbeer, B.-S. Jeong, and Y.-K. Lee, “EfficientTree Structures for High Utility Pattern Mining in IncrementalDatabases,” IEEE Trans. Knowledge and Data Eng., vol. 21, no. 12, pp. 1708-1721, Dec. 2009. [4] C.H. Cai, A.W.C. Fu, C.H. Cheng, and W.W. Kwong, “MiningAssociation Rules with Weighted Items,” Proc. Int‟l Database Eng.and Applications Symp. (IDEAS ‟98), pp. 68-77, 1998. [5] R. Chan, Q. Yang, and Y. Shen, “Mining High Utility Itemsets,”Proc. IEEE Third Int‟l Conf. Data Mining, pp. 19-26, Nov. 2003. [6] J.H. Chang, “Mining Weighted Sequential Patterns in a SequenceDatabase with a Time-Interval Weight,” KnowledgeBased Systems,vol. 24, no. 1, pp. 1-9, 2011. [7] M.-S. Chen, J.-S.Park, and P.S. Yu, “Efficient Data Mining for PathTraversal Patterns,” IEEE Trans. Knowledge and Data Eng., vol. 10,no. 2, pp. 209-221, Mar. 1998. [8] C. Creighton and S. Hanash, “Mining Gene Expression Databasesfor Association Rules,” Bioinformatics, vol. 19, no. 1, pp. 79-86,2003. [9] M.Y. Eltabakh, M. Ouzzani, M.A. Khalil, W.G. Aref, and A.K.Elmagarmid, “Incremental Mining for Frequent Patterns inEvolving Time Series Databases,” Technical Report CSD TR#08-02, Purdue Univ., 2008. [10] A. Erwin, R.P. Gopalan, and N.R. Achuthan, “Efficient Mining ofHigh Utility Itemsets from Large Data Sets,” Proc. 12th Pacific-AsiaConf. Advances in Knowledge Discovery and Data Mining (PAKDD),pp. 554-561, 2008. [11] E. Georgii, L. Richter, U. Ru¨ ckert, and S. Kramer, “AnalyzingMicroarray Data Using Quantitative Association Rules,” Bioinformatics, vol. 21, pp. 123-129, 2005. [12] J. Han, G. Dong, and Y. Yin, “Efficient Mining of Partial PeriodicPatterns in Time Series Database,” Proc. Int‟l Conf. on Data Eng.,pp. 106-115, 1999. [13] Efficient Algorithms for Mining High Utility Itemsets from Transactional Databases byVincent S. Tseng, BaiEn Shie, Cheng-Wei Wu, and Philip S. Yu . interests are computer networks security and cloud computing. BIOGRAPHIES MutyalaNarendrapursuingm.tech in avanthiinst of engg& tech, tamaram, makavarapalem, visakhapatnam, andhrapradesh, india. He received mca(master of computer applications) from jntuk (dadi inst. of engg& tech, anakapalli, visakhapatnam) in 2010. His interested areas are cloud computing, network security, data warehousing. Boddu Nanda Kishore working as assistant professor in the dept of computer science and engineering, avanthi institute of engineering and technology (affiliated to jntuk), tamaram, makavarapalem, visakhapatnam, andhrapradesh, india. He received his m.tech in computer science and engineering from jntuk. his main areas of SSN: 2231-5381 http://www.ijettjournal.org Page 90