kdb+ 中的机器学习
Contents
1. Introduction ..................................................................................... 3
2. Loading the Dataset in Q.................................................................... 4
3. Calculating distance metric ................................................................. 5
4. k-Nearest Neighbors and prediction ..................................................... 8
4.1 Nearest Neighbor k=1 ....................................................................................................................... 8
4.2 k>1 .................................................................................................................................................... 9
4.3 Prediction test .................................................................................................................................. 9
5. Accuracy checks ............................................................................. 11
5.1 Running with k=5 ............................................................................................................................ 11
5.2 Running with k=3 ............................................................................................................................ 12
5.3 Running with k=1 ............................................................................................................................ 12
6. Further Approaches ......................................................................... 13
6.1 Use slave threads ............................................................................................................................ 13
6.2 Euclidean or Manhattan distance? ................................................................................................. 13
6.3 Benchmarks .................................................................................................................................... 15
7. Conclusions.................................................................................... 17