# 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 first filtering, for all row-instances of the co-location pattern, we filter all row-instances with the first fuzzy feature. In the second filtering, for the row-instances obtained by the first filtering, we filter the row-instances with the second fuzzy feature, and so on. In the \(n\)th filtering, for the row-instances obtained by the \(n\)th filtering, we filter the row-instances with the \(n\)th fuzzy feature. The row-instances obtained by the \(n\)th filtering have all the fuzzy features of the FCP, so these are the row-instances of the FCP. For the fuzzy features contained in each feature, we calculate the ratio of the number of instances with the fuzzy feature to the number of instances with the feature, that is, \(\alpha_{1}=N_{Fuzz\_f_i}/N_{f_i}\), \(\alpha_{2}=N_{Fuzz\_f_2}/N_{f_2}\),..., \(\alpha_{n}=N_{Fuzz\_f_n}/N_{f_n}\). Thus, for a fuzzy feature \(Fuzz\_f_i\), it has a weight \(\alpha_{i}\). Then, we sort the fuzzy features of the candidate FCP in order according to the value of \(\alpha_{i}\) from smallest to largest. Through the method, in the table-instance of the co-location pattern, the pruning rate of pruning the row-instances without the first fuzzy feature is the highest in the first filter. This greatly reduces the number of row-instances that need to be filtered in the second filter, and so on, until the row-instances that contain all the fuzzy features of the candidate FCP are filtered. In this way, we can greatly reduce the time cost to judge these row-instances and the efficiency is improved to a great extent. The pseudocode of this algorithm (Algorithm 3) is as follows:
``` A candidate FCP \(Fuzz\_c=\{\text{Fuzz}f_1},\text{Fuzz}\_f_2,\dots,\text{Fuzz}f_n\}\) Table-instance \(Table\_c\) of co-location pattern that contains the candidate FCP Output: Table-instances of candidate FCP Table[n] Step:
1.Table =Table_c;
2.for each fuzzy feature Fuzz\(f_{i}\) in the candidate FCP \(Fuzz\_c\)
3.for each row-instance in Table
4.if (the row-instance doesn't contain Fuzz_f_i)
5.Table.Delete(the row-instance);
6.endfor
7.Table[i] =Table;
8.endfor
9.if i == \(n\)
10.Table[i] is the table-instance of the candidate FCPStep 1: The filtering operation begins with _Table_c_, a table-instance of the co-location pattern that consists of the features of the candidate FCP. Steps 2-8: For all row-instances of the table-instance in _Table_c_, we judge whether they have the first fuzzy feature of the candidate FCP. For any one of the row-instances, if it does not have the first fuzzy feature, we delete it; in this way, we filter out all the row-instances with the first fuzzy feature. Then, we judge whether these row-instances have the second fuzzy feature and filter out the row-instances that have both the first fuzzy feature and the second fuzzy feature, and so on. Steps 9-10: If the selected row-instance has all the fuzzy features of the candidate FCP, then the row-instance is a row-instance of the candidate FCP and all row-instances of the candidate FCP make up its table-instance. We compare the number of judgment operations between the column-filter method proposed in this section and the row-filter method proposed in Section 5.1 on average. For a candidate FCP of size \(p\), assume that the number of row-instances of the co-location pattern composed of its features is \(q\). According to the row-filter method in Section 5.1, for each row-instance, we need to judge whether each instance has corresponding fuzzy features in turn. When there is at least one instance in a row-instance that does not have corresponding fuzzy features, the row-instance cannot be used as a row-instance of the candidate fuzzy co-location pattern. On average, each instance in a row-instance has the same probability of not having corresponding fuzzy features, so the expected number of judgment operations of a row-instance is \(\frac{1+2+3+\ldots+p}{p}=\frac{\frac{p(p+1)}{2}}{p}=\frac{p+1}{2}\). We need to judge each row-instance in turn, so the expectation of the total number of judgment operations is \(\frac{q(p+1)}{2}\).