## 3 Expert Systems for Features Classification
### Optimization of the Learning Process of the SVM Expert System for IMs Fault Diagnosis  
The SVM expert system is quite optimal in solving problems that show a poorly linear distribution in its solutions. Nevertheless, its flexibility implies that it is necessary to adjust several coefficients during the training process to obtain a satisfactory learning of the expert system. The goal of  
Figure 7: Example of t-f spectrum where the range of frequencies that would be necessary to obtain broken bar fault features has been marked.  
the supra-system presented in this paper is also to optimize the value of such coefficients in an automatic way.  
SVM allows different kernels to transform the space form to improve the discrimination of different features with the use of a hyperplane. In [10] several common kernels are discussed. In particular, with the Polynomial Kernel (1) and Radial Basis Function (RBF) kernel (2), it is possible to solve almost all cases where the solution distribution of the problem goes from totally linear to scarcely linear.  
\[K(x_{i},x_{j})=(1+x_{i}^{T}x_{j})^{d} \tag{1}\]  
\[K(x_{i},x_{j})=exp\Bigg{[}-\left(\frac{\|x_{i}-x_{j}\|}{2\sigma}\right)^{2} \Bigg{]} \tag{2}\]  
To use one of these two kernels one must set two parameters in order to obtain an optimum learning SVM. If a Polynomial Kernel is used, it is necessary to set the pair of parameters \(\delta(C,d)\), where \(C\) is the box limit parameter for the search box during training and \(d\) is the polynomial order. If a RBF kernel is used, the pair of parameters that must be set are \(\delta(C,\sigma)\), where \(C\) is the box limit parameter and \(\sigma\) is the scale factor of the Gaussian function.  
In [10] it is explained how to fit these parameters by a mesh search method. Although this fitting method is less optimal than others with lower execution time, it guarantees a good approximation to the global solution avoiding local solutions that can be found by other heuristic fitting methods.  
Like the scheme in Figure 8, the mesh search method divides each parameter reachable range into subsets (similar to a mesh). On each subset an SVM is trained with the parameters of this subset, obtaining an estimation of its hit rate. Finally, the subset with the trained SVM with highest hit rate is selected and the described process is iterated in a depth search until the subset with the highest hit rate (without over-training) is obtained.  
It is relevant that all these trained SVM, generated during the mesh search, have had an optimal training to obtain a good approximation to the real hit rate. Achieving an optimal training for each SVM is another issue that is addressed in the supra-system presented in this paper.  
An expert system cannot be trained directly with the whole training set of fault features to obtain its hit ratio. Otherwise, the hit ratio would be erroneous. There are several methods to train and validate an SVM, but the most reliable for obtaining the best hit ratio approximation for SVM is the _leave one out cross validation_' method. With this method, the number of SVMs trained are equal to the number of fault features. In the particular field of IMs fault diagnosis, the number of fault features are not very high and therefore the computational complexity is acceptable.  
As described the scheme for the _'leave one out cross validation'_ (Figure 9), for each feature \(k\), a trained SVM is generated with the remaining features, that is, excluding \(k\) feature. Once the SVM has been  
Figure 8: Schematic example of setting a parameter with the mesh search method.  
trained, then the \(k\) feature is validated. Repeating this process for the whole set of fault features, it yields finally an approximate hit ratio quite close to the actual hit ratio.