# Impact of Imbalanced Datasets Preprocessing in the Performance of Associative Classifiers
## 3 Materials and Methods
### Associative Classifiers
#### 3.2.1 Hybrid Associative Classifier with Translation  
The Hybrid Associative Classifier with Translation (HACT or CHAT by its Spanish acronym) was proposed by [PERSON] as a classification model [41], and has been used successfully in the financial field [42].  
The HACT has two phases: association (training), and recovery (classification). This classifier assumes that the dataset is complete (that is, there are no absences of information in the data), and that it is described only by numerical attributes. In addition, it assumes that classes are represented by consecutive integers.  
Let us have a dataset, having association pairs \(p\) of the form \((x^{\mu},y^{\mu})\), where \(\mu=1,\,2,\,\ldots,\,p,\,x^{\mu}\in\mathbb{R}^{n}\) and \(y^{\mu}\in\mathbb{R}^{m}\). Each instance \(x^{\mu}\) is composed by \(n\) components, where \(x^{\mu}_{j}\) represents the j-th component of such instance. The classes \(y^{\mu}\) take the form of binary vectors of size \(m\), where \(y^{\mu}_{i}\) represents the i-th component of the vector.  
Before starting the training or association, the HACT classifier performs an axis translation process. To do this, the average of all training instances, component by component, is calculated, and then, all instances are translated considering that average. Le \(\hat{x}\) be the average of all instances. Each instance \(x^{\mu}\) is translated as \(\hat{x}^{\mu}\gets x^{\mu}-\hat{x}\).  
After translation, class vectors are formed. To do this, the binary \(y^{\mu}\) vectors corresponding to each instance are formed, and the corresponding component of each vector is set to 1. For example, if you have three classes (1, 2, 3) the vectors corresponding to each of the classes would be [1, 0, 0], [0, 1, 0] and [0, 0, 1], respectively. After the instances have been moved and the classes configured, the training phase of the HACT model constructs a matrix \(W\) so that when an input pattern \(\hat{x}^{\mu}\) is presented, the stored pattern \(y^{\mu}\) associated with the input pattern is recovered. This process comprises two basic steps:  
1. For each association \((\hat{x}^{\mu},y^{\mu})\) in the training set, the external product \(y^{\mu}\big{(}\hat{x}^{\mu T}\big{)}\) is completed, where \(\hat{x}^{\mu T}\) is the transposed of the input vector \(\hat{x}^{\mu}\).
2. Sum the \(p\) externals products to obtain the matrix \(W=\alpha\sum_{\mu=1}^{p}y^{\mu}\big{(}\hat{x}^{\mu T}\big{)}\), where \(\alpha\) is a normalization parameter (usually \(\alpha=1/p\)). Each component of the matrix \(W\) is defined as \(w_{i,j}=\sum_{\mu=1}^{p}y^{\mu}_{i}\hat{x}^{\mu}_{j}\). On the other hand, the classification phase of HACT consists of two phases:  
1. Translate the pattern to classify \(o\), according to the average of the training patterns, as \(\delta\gets o-\hat{x}\).
2. Determine the components of the output vector (class) for the pattern to classify \(\delta\). To do so, it is considered that \(y^{o}_{i}=\left\{\begin{array}{ll}1&\text{if }\sum_{j=1}^{n}w_{i,j}\delta_{j}= \max_{h=1,p}\Bigl{[}\sum_{j=1}^{n}w_{h,j}\delta_{j}\Bigr{]}\\ 0&\text{otherwise}\end{array}\right..\) Thus, the class \(k\) wil be returned if and only if the obtained vector has value 1 in its k-th component, and 0 in the remaining components.  
Although the HACT algorithm is unable of handling qualitative data, or absence of information in the data, it has obtained good results in the financial field [42].