## 3 Proposed Model
### PrefixSpan Algorithm
The data from Table 5 could then be further processed while identifying sequence patterns using the PrefixSpan algorithm. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Department** & **Department Name** & **Profit** \\ \hline A & Frozen & 500,111 \\ B & Bakery & 165,168 \\ C & Produce & 87,917 \\ D & Alcohol & 213,612 \\ E & International & 339,047 \\ F & Beverages & 240,790 \\ G & Pets & 58,603 \\ H & Dry Goods and Pasta & 32,417 \\ I & Bulk Food & 5669 \\ J & Personal Care & 396,602 \\ K & Meat Seafood & 181,856 \\ L & Pantry & 161,281 \\ M & Breakfast & 16,846 \\ N & Canned Goods & 73,052 \\ O & Dairy Eggs & 51,724 \\ P & Household & 462,062 \\ Q & Babies & 110,228 \\ R & Snacks & 188,293 \\ S & Deli & 66,213 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Profits of departments. \begin{table}
\begin{tabular}{c c} \hline \hline
**Department** & **Department Name** & **Product ID** \\ \hline A & Frozen & 4, 8, 12, 18, 46, 1176, 1268, 49636 \\ B & Bakery & 58, 245, 317, 346, 15369, 28129, 46065 \\ C & Produce & 89, 380, 4264, 7805, 11432, 23429, 48825 \\ D & Alcohol & 150, 3008, 5810, 10532, 32445 \\ E & International & 425, 1414, 4055, 6372, 9942, 20023 \\ F & Beverages & 197, 289, 16514, 25743, 35027 \\ G & Pets & 8445, 11558, 23337, 32748, 44480 \\ H & Dry Goods and Pasta & 173, 27675, 28301, 37469, 41224 \\ I & Bulk Food & 1000, 12699,19628, 22827, 32232, 42091 \\ J & Personal Care & 113, 280, 11929, 12172, 30689, 36905 \\ K & Meat Seafood & 5770, 7519, 18975, 20518 \\ L & Pantry & 4401, 4682, 11503, 26163, 34720, 41660 \\ M & Breakfast & 510, 1087, 15477, 23456 \\ N & Canned goods & 626, 1251, 10173 \\ O & Dairy Eggs & 432, 505, 894, 953, 1006 \\ P & Household & 14, 105, 328, 415, 500 \\ Q & Babies & 219, 309, 426, 873, 1202 \\ R & Snacks & 1, 16, 145, 164, 212, 213 \\ S & Deli & 49, 109, 138, 403, 886 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Examples of departments. \begin{table}
\begin{tabular}{c c} \hline \hline
**Order ID** & **Department** \\ \hline
1 & A, B, C, D, F \\
2 & A, D, C, E \\
3 & E, F, A, B, D, C \\
4 & E, A, F, C, B \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Department transaction database. shelf. This step began with the scanning of the DT data from Table 5 to find all frequent items in the DT. Each entry in the DT was taken in length\(-\)1 to be a prefix defined by Definition 1. The example data in Table 5 show a total of 6 prefixes, where <m>: count is a pattern followed by a support count: <A>: 1, <B>: 3, <C>: 4, <D>: 3, <E>: 3, and <F>: 3. Then, we divided the search space. A set of six prefixes of sequential patterns<A>, <B>, <C>, <D>, <E>, and <F> --were obtained from Step 1. The number of the projection database depended on <m>, where <m> is the subsets of the projection database. The data in Table 5 were used to find the projection comprising {A, B, C, D, E, F}. An example of the projection database format <A> from the first row of data in the DT database is <A, B, C, D, F>, since the pattern <A> is a projection defined by Definition 2. The patterns <B, C, D, F> were found to be postfixes of the pattern <A> by Definition 3. The projected database of the pattern <A> was found to contain <B, C, D, F>, <D, C, E>, <B, D, C>, and <F, C, B>. Other forms of postfix from <B> to <m> were the same. The projected data are displayed in Table 6.

Then, we found subsets of sequential patterns. In this step, subsets of sequential patterns were used to find a set of 2-length patterns from projected databases, and the process of finding sequential patterns was repeated until every transaction was completed. Following Definition 5, a sequential pattern and support count were used to find the support and confidence values with Equations (1) and (2). The procedure found the prefix (length\(-\)1) of the sequential patterns for <A>, specifically transactions that consisted of <A> by only considering postfixes that occurred after the prefixed <A>. For example, Order 3 was found to contain <E, F, A, B, D, C>, which has <A> as a prefix.