The result is a scalar value of each observation, named \(j_{sum}\).

3.2.2. Step two:

The squared distance between \(j_{sum}\) in (\ref{eq:6}) and the average vector in (\ref{840207}) is captured; the result is a vector \(v\) of size \(k\), named \(j_{avg}\), where \(k\) is the number of classes in __ds.

3.2.3. Step three:

The squared distance between\(j_{sum}\) in (\ref{eq:6}) and the error vector in (\ref{790239}) is captured; the result is a vector \(v\) of size \(k\), named \(j_{err}\), where \(k\) is the number of classes in __ds.

3.2.4. Step four:

The corresponding row observation from the neighbors’ summary in (\ref{103702}) is selected; the result is a vector \(v\) of size \(k\), named \(j_{ns}\), where \(k\) is the number of classes in __ds.

3.2.5. Step five:

Three vectors from (\ref{583955}), (\ref{758428}), and (\ref{992084}) are stacked and transposed; the result is a matrix of size (\(k\times3\)) named \(j^{T}_{stack}\).  Fig. (\ref{855784}) illustrates the five steps in sequence using the showcase example in (\ref{993524}).