## 3 Parallel Fuzzy Gradual Pattern Mining Based on Multi-Precision Fuzzy Orderings
### Managing Multi-Precision  
Concerning the implementation of the matrices of concordance degrees \(\tilde{c}\tilde{p}(i,j)\), we address two important issues: (i) the memory consumption; and (ii) the precision of the representation of the concordance degrees of each \(\tilde{c}\tilde{p}(i,j)\).  
In order to reduce memory consumption, we represent and store each matrix of concordance degrees according to the _Binary Fuzzy Matrix Multi-precision Format_, where each \(\tilde{c}c(i,j)\)\(\in\)[0, 1] is represented with a precision of 2, 3, or more up to 52 bits.  
Because we generate itemset candidates from the frequent \(k\)-itemsets, only matrices of the (\(k-1\))-level frequent gradual itemsets are kept in memory while being used to generate the matrices of the \((k)\)-level gradual itemset candidates. If the _support_ of a _gradual itemset_ (\(\mathcal{C}_{k,q}\)) is less than _minimum threshold_, then the \(\mathcal{C}_{k,q}\) is pruned and its matrix of fuzzy concordance degrees \(\tilde{cp}(i,j)\) is removed.  
As seen in the previous section, fuzzy orderings are interesting but consume large memory slots when they are stored as floating numbers.  
On the other hand, binary matrices are very efficient regarding both memory and time consumption, we thus consider binary vectors in order to represent the fuzzy degrees. The size of these vectors determine the precision we manage. Figure 3 shows how values are represented at the 3 bits precision.  
Each \(\tilde{cp}(i,j)\in[0,1]\) is thus represented with a precision ranging from 1 bit (crisp case) to \(n\) bits (52 in our implementation). \(n\) bits allow to represent up to \(2^{n}\) values. Figure 4 shows the real matrix of fuzzy concordance degrees. Figure 2 shows how to represent values at precision of 3 bits.  
Figure 4: Illustration of the binary matrix of fuzzy concordance degrees with a precision of three bits.  
Figure 3: Illustration of the real matrix of fuzzy concordance degrees.  
In our Algorithm 1, the concept of matrix concordant degrees plays an important role.  
```
Data:\(db\) (Database), # \(m\) (Attributes), # \(n\) (Records), \(minimum\_threshold\). Output: Frequent Gradual Itemsets \(\mathcal{F}_{k}\) \(\mathcal{F}_{k}\leftarrow\emptyset;\ gI\leftarrow\emptyset\); foreach\(attribute_{A}\in db\)do /*build their respective gradual items:*/; \(gI=gI+\{A_{\uparrow}\!\!\uparrow\), \(A_{\downarrow}\!\!\downarrow\}\); /* Candidate gradual itemset generation at level \(k=2\), of the form:*/; \(\mathcal{C}=\){\(A_{\downarrow}\!\!\uparrow\)\(A_{\downarrow}\!\!\uparrow\), \(A_{\downarrow}\!\!\uparrow\)\(A_{\downarrow}\!\!\downarrow\),..., \(A_{m-1}\!\!\downarrow\)\(A_{m}\!\!\downarrow\) }; foreach\(gradual\ itemset\ candidate\in\mathcal{C}\)do \(Compute\ their\ matrices\ of\ concordance\ degrees\ \tilde{c}p(i,j)\) \(Compute\ their\ support,\ as\ the\ sum\ of\ their\ matrices\ of\ concordance\ degrees\ divided\ by\ n(n-1)\); if\(support(candidate)\geq minimum\_threshold\)then \(\mathcal{F}_{k}\leftarrow\mathcal{F}_{k}\cup\{candidate\}\); Else\(delete(candidate\ and\ matrix)\); \(k++\); repeat /*Frequent gradual itemset mining,\(k>2\)*/; \(\mathcal{I}=GenItemset1 From\{\mathcal{F}_{k-1}\}\); \(\mathcal{J}=GenItemset2 From\{\mathcal{F}_{k-1}\}\); \(q=1\); foreach\(\{\mathcal{I},\mathcal{J}\}\in\mathcal{F}_{k-1}\)do \(Compute\ matrix\ of\ concordance\ degrees\ of\ candidate\ \mathcal{C}_{k,q}.M\ as:\) \(\mathcal{C}_{k,q}.M=\top-norm(\mathcal{I}.M,\mathcal{J}.M)\); /* \(\mathcal{I}.M,\mathcal{J}.M\) are matrices of concordance degrees of itemsets \(\mathcal{I},\mathcal{J}\)*/ \(support(\mathcal{C}_{k,q})=sumMatrix(\mathcal{C}_{k,q}.M)/n(n-1)\); if\(support(\mathcal{C}_{k,q})\geq minimum\_threshold\)then \(\mathcal{F}_{k}\leftarrow\mathcal{F}_{k}\cup\{\mathcal{C}_{k,q}\}\); Else\(delete(candidate\ and\ matrix)\); \(Delete(\mathcal{F}_{k-1}\ and\ Matrices)\); \(k\)++; \(q++\); until\(\mathcal{F}_{FGP}\) does not grow any more;
```  
**Algorithm 1** Fuzzy Orderings-based Gradual Itemset Mining