I\'m trying to hand calculate the distance and weight measures that are output from the R kknn package. I\'m able to correctly calculate the euclidean distances and inverse weig