3.3. The Prediction Stage
In this stage, eleven steps are involved in transforming the size \(n\) of a given observation into the size \(1\times6\) and predicting its class; the sequence of steps is as follows:
3.3.1. Step one:
The given observation is scaled by the \(v_{norm}\) in (\ref{662612}). As a result, a scaled observation name _\(O\) of size \(n\) is used.
3.3.2. Step two:
Neighbors’ summary created for the observation using the __ds in (\ref{662612}) and the \(r_{inner}\) in (\ref{662612}). As a result, a vector \(v\) is named \(O_{ns}\) of size \(k\), where \(k\) is equal to the number of classes in the __ds.
3.3.3. Step three:
The sum of \(n\) variables of the observation in (\ref{256861}) is captured. The result is a scalar named \(O_{j_{sum}}\).
3.3.4. Step four:
The square root difference between \(O_{j_{sum}}\) in (\ref{715942}) and the avg vector in (\ref{662612}) is calculated. The result is a vector \(v\) named \(O_{avg}\) of size \(k\), where \(k\) is equal to the number of classes in the __ds.
3.3.5. Step five:
The square root difference between \(O_{j_{sum}}\) in (\ref{715942}) and the err vector in (\ref{662612}) is calculated. The result is a vector \(v\) named \(O_{err}\) of size \(k\), where \(k\) is equal to the number of classes in the __ds.
3.3.6. Step six:
Three vectors from (\ref{942999}), (\ref{257588}), and (\ref{690083}) are stacked and transposed; the result is a matrix of size \(k\times3\) named \(O_{stack}^T\).
3.3.7. Step seven:
The index of the maximum value of each column in (\ref{694027}) is captured. The result is a vector \(v\) of size 3, named \(O_{\max}\); simultaneously, the index of the minimum value of each column in (\ref{694027}) is captured. The result is a vector \(v\) of size 3, which is denoted as \(O_{\min}\). Fig. (\ref{730712}) illustrates the seven steps outlined above using the showcase example in (\ref{993524}).