There are two types of classification using frequent patterns:
The generic association classification algorithm is defined here. The input parameters for the kNN algorithm are as follows:
The output of the algorithm is a rule-based classifier and is shown as follows:
Two popular algorithms are illustrated in the successive sections, one is Classification Based on Association (CBA), and the other is Classification Based on Multiple Association Rules (CMAR).
Please look up the R codes files ch_04_associative_classification.R
, ch_04_cba.R
, and ch_04_frequent_pattern_based_classification.R
from the bundle of R codes for the previously mentioned algorithms. The codes can be tested with the following commands:
> source("ch_04_associative_classification.R") > source("ch_04_cba.R") > source("ch_04_frequent_pattern_based_classification.R")
One application of CBA is text classification. The key here is to build a matrix with a document or text term and labels. With the matrix built, any classification algorithm can be applied to it. One example of document matrix is illustrated here. The term might include a character, word, phrase, and concept and so on.
3.12.161.6