# An Optimized Brain-Based Algorithm for Classifying Parkinson's Disease
## 4 Extreme Learning Machine  
In artificial intelligence, machine learning approaches have gained popularity in the last years, mainly for their contributions in different disciplines. The extreme learning machine is a particular case of machine learning methods [17]. ELM can be classified as a supervised learning algorithm able to solve linear and non-linear classification problems. Traditional artificial neural network architectures describe ELM as Single Layer Feedforward Neural Network (SLFN) [45], where input weights and hidden layer biases do not need to iteratively be computed. One of the conventional ELM implementations is about the randomly calculated nodes in the hidden layer independently of the training data [46]. ELM has also been designed for working under the linear algebra operators, and thus to achieve the optimal weights in the output layer. A formal description of an ELM can be described from a set of \(N\) independent and identically distributed random variables as a training sample \((x_{i},t_{i})\), where \(x_{i}\) represents the transpose of the \(n\)-dimensional vector, i.e., \(x_{i}=[x_{i1},x_{i2},\dots,x_{in}]^{T}\in\mathds{R}^{n}\), and \(t_{i}\) describes the transpose of the \(m\)-dimensional vector, i.e., \(t_{i}=[t_{i1},t_{i2},\dots,t_{in}]^{T}\in\mathds{R}^{m}\). Thus, standard SLFNs with \(\tilde{N}\) hidden nodes and activation function \(g(x)=Sig(x)=\left(\dfrac{1}{1+e^{-x}}\right)\), they are mathematically modeled by:  
\[\sum_{i=1}^{\tilde{N}}\beta_{i}g_{i}(x_{j})=\sum_{i=1}^{\tilde{N}}\beta_{i}g(w _{i}\cdot x_{j}+\beta_{i})=o_{j},\quad\forall\;j\in\{1,2,\dots,N\} \tag{1}\]  
where \([w_{i}=w_{i1},w_{2},\dots,w_{in}]^{T}\) is the weight vector connecting the \(i\)th hidden node and the input nodes, \([\beta_{i}=\beta_{i1},\beta_{i2},\dots,\beta_{in}]^{T}\) is the weight vector connecting the \(i\)th hidden node and the output nodes, and \(\beta_{i}\) is the bias of the \(i\)th hidden node. The inner product between \(w_{i}\) and \(x_{j}\) is denoted by \(w_{i}\cdot x_{j}\) (see Figure 1). [PERSON] et al. have rigorously proved in [17] that for \(N\) arbitrary distinct samples and any \((w_{i},\beta_{i})\) randomly chosen from \(\mathds{R}^{n}\times\mathds{R}^{m}\) according to any continuous probability distribution, the hidden layer output matrix \(H\) of a standard SLFN with \(N\) hidden nodes, and it is invertible. Moreover, \(||H\beta-T||=0\) with probability one if the activation function \(g:\mathds{R}\mapsto\mathds{R}\) is infinitely differentiable in any interval. Then, if we assume \(H\beta=T\), the \(N\)-equations can be defined by:  
\[H(w_{1},w_{2},\dots,w_{N},\beta_{1},\beta_{2},\dots,\beta_{\tilde{N}},x_{1},x _{2},\dots,w_{\tilde{N}})=\left[ \begin{array}{ccc}g(w_{1}\cdot x_{1}+\beta_ {1})&\cdots&g(w_{\tilde{N}}\cdot x_{1}+\beta_{\tilde{N}})\\ \vdots&\cdots&\vdots\\ g(w_{1}\cdot x_{N}+\beta_{1})&\cdots&g(w_{\tilde{N}}\cdot x_{N}+\beta_{\tilde {N}})\end{array} \right]_{N\times\tilde{N}}, \tag{2}\]  
where  
\[\beta=\left[\beta_{1}^{T}\quad\cdots\quad\beta_{\tilde{N}}^{T}\right]_{\tilde {N}\times m}\quad\text{and}\quad T=\left[t_{1}^{T}\quad\cdots\quad t_{N}^{T} \right]_{N\times m} \tag{3}\]  
The solution is given by computing the norm of weights \(\hat{\beta}=H^{\mathsf{T}}T\), where \(H^{\mathsf{T}}\) is the Moore-Penrose generalized inverse of matrix \(H\). ELM algorithm requires a training sample \((x_{i},t_{i})\in\mathbb{R}^{n}\times\mathbb{R}^{m}\)\(\forall\)\(i\in\{1,2,\ldots,\tilde{N}\}\), an activation function \(g\) and set of hidden nodes \(H\), to ensure a weight output vector. These weights connect hidden nodes to the hidden output. The procedure can be summarized in three stages:  
1. Randomly generate input weight and bias \((w_{i},\beta_{i})\), \(i=\{1,2,\ldots,\tilde{N}\}\). 2. Calculate the hidden layer output matrix \(H\). 3. Calculate the weight \(\hat{\beta}=H^{\dagger}T\). The original version of ELM works properly, however, we firmly believe that its performance can be even better [47].