# A One-Phase Tree-Structure Method to Mine High Temporal Fuzzy Utility Itemsets
## 4 The Proposed Algorithm
### Transformed into a Fuzzy Database  
In order to execute the _ATTFUIM_ method for mining _HTFUIs_, the pre-processing step is first executed. First, each transaction _TID_ in a database is converted according to its sale time to a specific time period. The start time period of each item in the given database is then recorded. Next, the quantities of all the items in a database are fuzzified into linguistic terms based on the defined membership functions. In the transformation process, the fuzzy value of each transformed term can be obtained as well. For the _TQD_ in Table 1, the start time periods (_STPs_) of all the items are shown in Table 3.  
Assume the five items in _TQD_ use the same membership functions in Figure 1. The final fuzzified results are listed in the last column of Table 1. Then the upper-bound measure is utilized to generate the downward-closure property. The _mtffu_ value of each transaction needs to be calculated. Thus, to calculate the upper-bound value of a transaction, the _fu_ value of each linguistic term in the transformed database (the last column of Table 1) needs to be obtained. For example, for the linguistic term (_a.L_) with the value 0.66 in \(T_{2}\), its _fu_\({}_{2,a,L}\) is 5.36 (=0.67 \(\times\) 4 \(\times\) 2). The _fu_ values of the other linguistic terms in \(T_{2}\) are _fu_\({}_{2,a,M}\) (2.64), _fu_\({}_{2,b,L}\) (16.08), and _fu_\({}_{2,a,M}\) (_7.92_), respectively. Thus, the _mtfu_ and _fu_ values of \(T_{2}\) are  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline _Item_ & \(a\) & \(b\) & \(c\) & \(d\) & \(e\) \\ \hline _STP_ & \(P_{1}\) & \(P_{1}\) & \(P_{1}\) & \(P_{2}\) & \(P_{2}\) \\ \hline \hline \end{tabular}
\end{table}
Table 3: The STP of all items for the running example.  
21.44 (=5.36 + 16.08) and 32 (=5.36 + 2.64 + 16.08 + 7.92). The _mtfu_ and _tfu_ values for all the transactions are listed in Table 4.  
Next, the _tfuurb_ value of each linguistic term is calculated. Take the linguistic term (_a.L_) in the last column of Table 1 as an example. It can be observed that the term (_a.L_) happens in \(T_{2}\), \(T_{3}\), \(T_{4}\), \(T_{5}\), and \(T_{6}\), and their _mtfu_ values are shown in Table 4. Besides, the \(STP_{all}\) derived from Table 3 is \(P_{2}\). Assume the defined threshold is 40%. According to definition 10, the _tfuurb_ value of the linguistic term (_a.L_) is first handled. The numerator is 139.56 (=21.44 + 1.98 + 45.42 + 47.36 + 23.36). Then, the denominator is calculated as 128.68 (=1.98 + 53.34 + 47.36 + 26), which depicts the _tfu_ value from \(STP_{all}\) (\(P_{2}\)) to \(LTP_{all}\) (\(P_{3}\)). The _tfuurb_ value of the linguistic term (_a.L_) is then 108.4% (=139.56/128.68), which is not less than the defined threshold. Therefore, the linguistic term (_a.L_) is an _HTFUUBI_. The same process is performed for the other terms, and the sorted results based on their occurrence frequency are displayed in Table 5.  
The linguistic terms that are not _HTFUUIBIs_ are then deleted from the transformed database. The remaining linguistic terms in a transaction are sorted by descending counts and formed as a revised database. The resultant revised database is shown in Table 6.  
The rearranged terms in each transaction are then used to be inserted into the tree sequentially. The process is described below.