I need to find Mahalanobis Distance between my training data and testing data for K.NN
algorithm.
I found some descriptions on the internet, but I could not understand them as there was no practical example.
Training data:
flower = {s.length, s.width, p.lenght, p.width, class}
x1 = {5.1, 3.5, 1.4, 0.2, setosa}
x2 = {6.4, 3.2, 4.5, 1.5, versicolour}
x3 = {7.1, 3, 5.9, 2.1, virginica}
Testing data:
y1 = {4.9, 3, 1.4, 0.2, (Which class?)}
These are my data and I need to find that y1
belongs to which class according to my training data? (this data belongs to setosa class, but I need to prove it's using Mahalanobis Distance)
Any help will be appreciated.