K nearest neighbors in Mathcad - what functions I can use?

107 Views Asked by At

I found the k nearest neighbours Mathcad implementation in M. Nixon's book but 'distance' and 'coord' functions don't work. How can I fix it? mathcad implementation

1

There are 1 best solutions below

0
On

coord return position of minimal value in the dist. This function could be like that

<code>match</code>

distance - Hmm, I think that is something wrong here

example from book

because it should be something like that

euclidian distance

or some other distance between test and i element from the data