Você está na página 1de 1

APRIORI é algoritmo muito utilizado

para data mining(mineração de dados )

Apriori[1] é um dos mais famosos algoritmos para Web mining existentes.


Utilizada um hash sobre uma árvore para coletar informações em um banco de dados.
[2]
O núcleo do algoritmo se resume à:
{\displaystyle \mathrm {Apriori} (T,\epsilon )} {\displaystyle \mathrm {Apriori}
(T,\epsilon )}
{\displaystyle L_{1}\gets \{\mathrm {large~1-itemsets} \}} {\displaystyle
L_{1}\gets \{\mathrm {large~1-itemsets} \}}
{\displaystyle k\gets 2} {\displaystyle k\gets 2}
{\displaystyle \mathrm {\textbf {while}} ~L_{k-1}\neq \emptyset } {\displaystyle
\mathrm {\textbf {while}} ~L_{k-1}\neq \emptyset }
{\displaystyle C_{k}\gets \{c|c=a\cup \{b\}\land a\in L_{k-1}\land b\in \bigcup
L_{k-1}\land b\not \in a\}} {\displaystyle C_{k}\gets \{c|c=a\cup \{b\}\land a\in
L_{k-1}\land b\in \bigcup L_{k-1}\land b\not \in a\}}
{\displaystyle \mathrm {{\textbf {for}}~transactions} ~t\in T} {\displaystyle
\mathrm {{\textbf {for}}~transactions} ~t\in T}
{\displaystyle C_{t}\gets \{c|c\in C_{k}\land c\subseteq t\}} {\displaystyle
C_{t}\gets \{c|c\in C_{k}\land c\subseteq t\}}
{\displaystyle \mathrm {{\textbf {for}}~candidates} ~c\in C_{t}} {\displaystyle
\mathrm {{\textbf {for}}~candidates} ~c\in C_{t}}
{\displaystyle count[c]\gets count[c]+1} {\displaystyle count[c]\gets count[c]+1}
{\displaystyle L_{k}\gets \{c|c\in C_{k}\land ~count[c]\geq \epsilon \}}
{\displaystyle L_{k}\gets \{c|c\in C_{k}\land ~count[c]\geq \epsilon \}}
{\displaystyle k\gets k+1} {\displaystyle k\gets k+1}
{\displaystyle \mathrm {\textbf {return}} ~\bigcup _{k}L_{k}} {\displaystyle
\mathrm {\textbf {return}} ~\bigcup _{k}L_{k}}

Você também pode gostar