# Impact of Imbalanced Datasets Preprocessing in the Performance of Associative Classifiers
## 3 Materials and Methods
### Associative Classifiers
#### 3.2.4 Smallest Normalized Difference Associative Memory  
The Smallest Normalized Difference Associative Memory classifier (SNDAM) is also a newly created classification algorithm within the associative approach. It was proposed by [PERSON] and collaborators [PERSON] and collaborators [PERSON] and collaborators (2017), and aims to reduce the limitations of the classic Alpha-Beta associative memories.  
This classification model assumes a set of training and test data described by numerical attributes, and not having absences of information. The SNDAM model is based on two operators: the generalized alpha operator \(\alpha_{R}\) and the generalized beta operator \(\beta_{R}\), in its variants MAX (\(\beta_{\bar{R}}\)) and MIN (\(\beta_{\bar{R}}\)). Let \(c\) and \(d\) be two real numbers, the generalized alpha and beta operators are:  
\[\alpha_{R}(c,d)=c-d+1 \tag{7}\]  
\[\beta_{\bar{R}}(c,d)=\begin{cases}d-|c|-1&\text{if }c\
eq d\\ c&\text{if }c=d\end{cases} \tag{8}\]  
\[\beta_{\bar{R}}(c,d)=\begin{cases}c-|d|-1&\text{if }c\
eq d\\ d&\text{if }c=d\end{cases} \tag{9}\]  
For the training of this classifier, there are two aspects: the behavior as an associative memory type MAX, or as an associative memory type MIN. Depending on this, the SNDAM training phase begins as follows:  
For each instance \(x\in X\) in the training set, an auto-associative matrix \(M_{x}\) is created using the generalized alpha operator. Each component \(mx_{i,j}\), with \(i,j\in[1,m]\) of such matrix is given by:  
\[mx_{i,j}=\alpha_{R}\Big{(}x_{i},x_{j}\Big{)} \tag{10}\]  
Subsequently, if it is a memory type MAX, an array of associations \(M\) is created whose components \(m\_max_{i,j}\) are calculated according to Equation (11). In the MIN case, the components of the association matrix are created according to Equation (12). In other words, the matrices obtained for each object of the training set are generalized in a single matrix, through the maximum and minimum operators, component by component.  
\[m\_max_{i,j}=\bigvee_{x\in X}mx_{i,j} \tag{11}\]  
\[m\_min_{i,j}=\bigwedge_{x\in X}mx_{i,j} \tag{12}\]  
After the matrix \(M\) is constructed, the maximum values of each of the attributes are calculated, considering the objects in the training set. For each attribute \(A_{i}\) a value \(MAX_{i}\) will then be associated.  
Let \(p\) be a test instance that it is wanted to be recovered from the associative memory. The recovery phase in this model will return an artificial object z, described by real attributes. In the recovery phase, there are also two types: the MAX and MIN. In the first case, to obtain the components \(z\_max_{i}\) of the artificial object z Equation (13) is used for the recovery, while in the second Equation (14) is used.  
\[z\_max_{i}=\bigwedge_{j=1..m}\beta_{\bar{R}}\Big{(}m\_max_{i,j},p_{j}\Big{)} \tag{13}\]\[z_{\_}min_{i}=\bigvee_{j=1\_m}\beta_{\_}R\big{(}m_{\_}min_{i,j},p_{\_}j\big{)} \tag{14}\]  
Then, the normalized difference \(\delta\) between the recovered instance z and each of the instances of the training set \(x\in X\) is calculated. Again, there are two possibilities, Max and MIN. These differences are calculated as:  
\[\delta_{\_}max(x,z)=\sum_{\_}{i=1}^{m}\frac{|z_{\_}max_{\_}i-x_{\_}i|}{MAX_{\_}i} \tag{15}\]  
\[\delta_{\_}min(x,z)=\sum_{\_}{i=1}^{m}\frac{|z_{\_}min_{\_}i-x_{\_}i|}{MAX_{\_}i} \tag{16}\]  
Finally, the class of the instance whose normalized difference with the instance to be classified was smaller was assigned.  
This classifier has been successfully applied in solving medical problems [47]. However, in the knowledge of the authors, the SNDAM classifier has not been applied to the financial field.