# 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.3 Generating Candidate FCPs  
In the process of generating candidate FCPs, we find that two fuzzy features with different features can form a candidate FCP; two fuzzy features with the same feature and different attributes can also form a candidate FCP. However, the FCP composed of fuzzy features with the same features and the same attributes has no practical significance, such as {A.Cu(L), A.Cu(M), A.Cu(H)}. In order to avoid producing such a meaningless candidate FCP, we propose an Apriori-like algorithm and bucket to generate complete candidate FCPs. The steps of the algorithm (Algorithm 2) are as follows:  
```
Input: (1) Fuzzy feature set Fuzzy\(\_\)Fuzz\(\_\)Fea = \(\{\)Fuzz\(f_{1}\), Fuzz\(f_{2}\),..., Fuzz\(f_{n}\)\(\}\) (2) Feature set Fea\(\_\)List = \(\{\)Fea\({}_{1}\), Fea\({}_{2}\),..., Fea\({}_{n}\)\(\}\) (3) Instance set of fuzzy features S = \(\{\)s\({}_{1}\), \(\)s\({}_{2}\),..., \(s_{n}\)\(\}\) (4) Spatial proximity relation R (5) Minimum distance threshold min\(\_\)dist (6) Minimum prevalence threshold min\(\_\)prev Output\(C_{k+1}\): \(k+1\) size candidate FCPs Step:
1.if (\(k==1\))
2. for each Fuzz\(\_\)f in Fuzz\(\_\)Fea do
3. SetId(Fuzz\(\_\)f)
4. Initialize\(\_\)bucket(Fuzz\(\_\)f)
5.else if (\(k==2\))
6. for each Fuzz\(\_\)f\(\_\)1 in one feature
7. for each Fuzz\(\_\)f\(\_\)2 in other feature
8. Generate a candidate pattern from Fuzz\(\_\)f\(\_\)1 and Fuzz\(\_\)f\(\_\)2
9. for each Faa in Faa\(\_\)List
10. for each Fuzz\(\_\)f\(\_\)1 in the first attribute
11. for each Fuzz\(\_\)f\(\_\)2 in the second attribute
12. Generate a candidate pattern from Fuzz\(\_\)f\(\_\)1 and Fuzz\(\_\)f\(\_\)2
13. Put fuzzy patterns with the same features and the same attributes into the same bucket
14.else
15. for(\(i=1\); \(i<bucket\_count\); \(i++\))
16. for each fuzzy pattern in \(bucket[i]\)
17. for(\(j=i+1\); \(j<bucket\_count\); \(j++\))
18. for each fuzzy pattern in \(bucket[j]\)
19. if the first \(k-1\) fuzzy features of the two \(k\)-size fuzzy patterns are the same
20. Generate a fuzzy pattern \(c_{k+1}\)
21. if (check(k-1, \(c_{k+1}\), bucket))
22. \(c_{k+1}\) is a new candidate fuzzy pattern
23. Put fuzzy patterns with the same features and the same attributes into the same bucket

Figure 9: An example of constituting FCPM-cliques with only one instance. Steps 2-4: we put all fuzzy features with the same feature and the same attribute into the same bucket. Steps 6-8: size-2 candidate FCPs are generated by connecting the fuzzy features contained in any two different features. Steps 9-12: since the number of attributes is 2, all fuzzy features contained in a feature can be divided into two sets of fuzzy features with the same features and different attributes by connecting any two fuzzy features in the two sets of fuzzy features, and a size-2 candidate FCP is generated. Step 13: put the fuzzy patterns with the same features and the same attributes into the same bucket. Steps 15-22: generate \(k+1\) size candidates from \(k\) size prevalent fuzzy patterns; for any two prevalent fuzzy patterns, check whether the first \(k-1\) fuzzy features of the two fuzzy patterns are the same, and if they are same, connect them to generate a \(k+1\) size candidate fuzzy pattern. Finally, we check whether each sub-pattern of the newly generated \(k+1\) size candidate fuzzy pattern is prevalent. Step 23: put the fuzzy patterns with the same features and the same attributes into the same bucket. #### 4.1.4 Find the Row-Instances of the Candidate FCPs by the Column-Filter Method

In order to improve the efficiency of finding row-instances of candidate FCPs, we propose a column-filter method to find the row-instances of the candidate FCPs from the row-instances of co-location patterns. First, we find the co-location pattern consisting of all the non-recurring features in the candidate FCP. Suppose the number of fuzzy features contained in the FCP is \(n\), we obtain the row-instance of the FCP through filtering \(n\) times.