The cross validation of K is implemented. Now the best K value is a weighted average of K over rounds of cross validation. The weight of each K is proportional to the performance (1 - error probability) of each K.