# Imbalanced Diagnosis Scheme for Incipient Rotor Faults in Inverter-Fed Induction Motors
## 2 Background
### Feature Selection through Relief Algorithm  
The fault signatures mentioned above are obtained through a manual inspection process assisted by MATLAB(r) software version number R2023a. After collecting these fault signatures, a feature selection process is commonly used to eliminate noisy, irrelevant, and redundant variables from the set. This selective analysis aims to improve subsequent classification. For this purpose, the Algorithm 1 (ReliefF algorithm [18]) is applied. This technique scores the impact of changes based on how their values distinguish closely labelled observations.  
ReliefF [18] is an extension of the Relief algorithm designed for binary problems. However, Reflieff can deal with more than two classes and is more robust considering that it can deal with incomplete and noisy data [19]. Given a randomly selected observation \(S_{o}\), ReliefF searches for \(k\) of its nearest neighbours in the same class. These are called the closest results \(R_{j}\), hits or successes. This algorithm also searches for \(k\) nearest neighbours of each different class. They are called nearest misses \(M_{j}(C)\). The quality estimate \(W[F]\) is updated for all features \(F\) based on their values for \(S_{o}\), \(M_{j}(C)\) and \(R_{o}\). The contributions of all successes and misses are averaged through the update expression. That is to say, the contribution for each class of the misses is weighted with the prior probability of that class \(P(C)\) that, using the training set, is estimated. If the observations \(S_{o}\) and \(R_{j}\) have different values of the characteristic \(F\), then the characteristic \(F\) will separate two observations belonging to the same class, which is undesirable. The estimation of quality \(W[F]\) is reduced. This process is repeated \(m\) times. The choice of \(k\) successes and failures ensures higher algorithm reliability concerning noise. The difference between the values of the variable or feature \(F\) for two observations \(O_{1}\) and \(O_{2}\) is computed by the function \(diff(F,O_{1},O_{2})\). For numerical variables, the function is defined as follows:  
\[diff(F,O_{1},O_{2})=\frac{|value(F,O_{1})-value(F,O_{2})|}{max(F)-min(F)} \tag{7}\]  
The \(diff\) function calculates the distance between observations to determine the nearest neighbor's location. The total distance is calculated as the sum of the distances across all features or variables, known as the Manhattan distance.  
Figure 2: Power spectral density of a measured stator current from an inverter—fed induction motor.  
```
0: Training observations with their respective vector of features
0: The vector \(W\) with the quality estimation of the features
1: Set all feature weights to zero \(W[F]=0\)
2:for\(o\gets 1,\dots,m\)do
3: Random selection of an observation \(S_{o}\)
4: Locate \(k\) nearest results, named as \(R_{j}\)
5:for each class \(C\
eq class(S_{o})\)do
6: From class \(C\) identify \(k\) nearest misses named as \(M_{j}(C)\)
7:for\(F=1\) to \(f\)do
8:\(W[F]=W[F]-\sum_{j=1}^{k}\frac{diff(F,S_{o},R_{j})}{m\cdot k}+\)\(\sum_{C\
eq class(S_{o})}\frac{\left\lceil\frac{P(C)}{1-P( class(S_{o}))}\right\rceil_{k=1}^{k}diff(F,S_{o},M_{j}(C))}{m\cdot k}\)
9:endfor
10:endfor
11:endfor
```  
**Algorithm 1** ReliefF [18]