I count the time of "Matrix multiply" and "Find nearest neighbor's type".
The result
[1] "matrix multiple cost time: 6.65000000000023"
[1] "get min cost time: 67.229999999987"
[1] "k= 1 total instance= 16000"
[1] "correct rate= 0.92125"
[1] "total cost time= 77.36"
I found that "the time of find nearest's type"(67 sec) is much larger than
"the time of Matrix multiply"(6.6 sec).
I guess this is the difference of 100hr and 50hr.
Following is the related part of my code.
XX/YY is the vector of "inner product of each training/valid set vector"
le,va is the training and valid set array.