# A Spatial Fuzzy Co-Location Pattern Mining Method Based on Interval Type-2 Fuzzy Sets
## 4 Methods
### A Mining Method Based on Spatial Cliques
#### 4.1.2 Generating FCP Mining Cliques (FCPM-Cliques)
\begin{table}
\begin{tabular}{c c c} \hline \hline
**SNs** & **Instance** & **BNs** \\ \hline - & A.1 & {B.1} \\ \hline - & A.2 & {B.2} \\ \hline - & A.3 & {B.3, B.4, C.1, D.1} \\ \hline \{A.1\} & B.1 & - \\ \hline \{A.2\} & B.2 & - \\ \hline \{A.3\} & B.3 & {C.1} \\ \hline \{A.3\} & B.4 & {C.1, D.1} \\ \hline \{A.3, B.3, B.4} & C.1 & {D.1} \\ \hline \{A.3, B.3, B.4, C.1} & D.1 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Neighborhood table of instances. Figure 7: An example of an N-tree constructed by the NDM. **Strategy 1:** If the size of the clique \(\mid cli\mid=1\), SNs(s)\(\cap\)BNs(s\({}_{1}\)) = \(\varnothing\), \(s\) and \(cli\) can form a new clique because \(s\in\) BNs(s\({}_{1}\)) and \(s_{1}\in\) SNs(s). **Strategy 2:** If the size of the clique \(\mid cli\mid>1\), SNs(s)\(\cap\)BNs(s\({}_{1}\)) \(\supseteq\) {\(s_{2}\), \(s_{3}\),..., \(s_{n}\)}, \(s\) and \(cli\) can form a new clique because \(\forall s_{i}\in cli\) and there is R(s, \(s_{i}\)). **Strategy 3:** If the size of the clique \(\mid cli\mid>1\), \(cli^{\prime}=\) SNs(s)\(\cap\)BNs(s\({}_{1}\)) \(\subseteq\) {\(s_{2}\), \(s_{3}\),..., \(s_{n}\)}, \(s\) and \(s_{1}\cup cli^{\prime}\) can form a new clique. **Strategy 4:** If the size of the clique \(\mid cli\mid>1\), SNs(s)\(\cap\)BNs(s\({}_{1}\)) \(\
otin\) {\(s_{2}\), \(s_{3}\),..., \(s_{n}\)} and {\(s_{2}\), \(s_{3}\),..., \(s_{n}\)}\(\
otin\) SNs(s)\(\cap\)BNs(s\({}_{1}\)), but \(cli^{\prime}=\) SNs(s)\(\cap\)BNs(s\({}_{1}\)) \(\cap\) {\(s_{2}\), \(s_{3}\),..., \(s_{n}\)}\(\
eq\)\(\varnothing\), \(s\) and \(cli^{\prime}\)\(\cup\)\(s_{1}\) can form a new clique. The NDM uses four strategies to construct an N-tree in the order of instances in the neighborhood table. For instance \(s\) in the neighborhood table, we can get SNs(s). According to the four different situations of SNs(s) \(\cap\) BNs(s\({}_{1}\)), we adopt four strategies to build the N-tree. After traversing each instance in the neighborhood table, an N-tree is completely established. The pseudocode for the NDM is as follows (Algorithm 1):  
**Input:**  
_nbsl_: neighborhood relationship list (including SNs and BNs of each instance)  
_S_: a set of instances  
**Output:**  
list of N-cliques  
**Steps:**  
1. nTree = Initialize N-tree;  
2. For each instance \(s\) In _nbsl_.Instances Do  
3. _queue_ = SNs(s);  
4. While NotEmpty(_queue_) Do  
5. _head_ = nTree.AddHeadNode(_queue_.Out);  
6. _bodies_ = GetCurrentBodies(_head_);  
7. _relation_ = _queue_BNs(_head_);  
8. If _bodies_ == null \(\mid\mid\)_relation_ == null Then  
9. _head_.AddNode(s)  
10. Else  
11. For Each list \(l\) in bodies do  
12. If \(l\) == _relation_ Then  
13. \(s\) and _cli_ can form a new clique;  
14. Else If _relation_ \(\supseteq\)\(l\) Then  
15. \(s\) and _cli_ can form a new clique;  
16. Else If _relation_ \(\Leftarrow\)\(l\) Then  
17. \(s\) and _relation_ \(\Leftarrow\)\(s_{1}\) can form a new clique;  
18. Else If NotEmpty(\(l\) \(\cap\) _relation_) Then  
19. \(s\) and _relation_ \(\Leftarrow\)\(l\)\(\cup\)\(s_{1}\) can form a new clique;  
20. End If  
21. End For  
22. End If  
23. End While  
24. End For  
**Algorithm 1**Neighborhood Driven Method. We use an example to illustrate the process of constructing an N-tree using the NDM. Figure 7 shows an example of constructing an N-tree according to the order of the instances in Table 4. In order to generate a clique with A.3 as its head (that is \(H_{A,3}\)-clique), we start from A.3--there is BNs(A.3) = {B.3, B.4, C.1, D.1}. If we start from B.3, there is SNs(A.3) \(\cap\) BNs(B.3) = \(\varnothing\), and, according to Strategy 1, A.3 and B.3 can form a clique. In the sameway, there is SNs(A.3) \(\cap\) BNs(B.4) =\(\varnothing\), where A.3 and B.4 can form a clique. Then, SNs(A.3) \(\cap\) BNs(C.1) = {B.3, B.4} according to Strategy 2, C.1 and {A.3, B.3} can form a new clique and C.1 and {A.3, B.4} can also form a new clique. Finally, SNs(A.3) \(\cap\) BNs(D.1) = {B.4, C.1} according to Strategy 3, D.1 and {A.3, B.4, C.1} can form a new clique.