This issue has been fixed in the later versions for KNN and Naive Bayes as well as in https://github.com/yandiwu/CS760project
Intro to AI (http://pages.cs.wisc.edu/~yw/CS540S20E.htm) and Machine Learning (https://danielpimentel.github.io/teaching.html)