The implementation and comparison of Optimal Bayes with symmetric loss and KNN Classifier
This repo compares optimal bayes classifier-a probabilistic approach and knearest neighbor classifier-a geometric approach
The Bayes Optimal Classifier is a probabilistic model that makes the most probable prediction for a new example. The implementation of this file could be found here. This classifier assumes the loss function is symmetric. The mathematical derivation of optimal bayes classifier with symmetric loss function could be found here
k-NN is a type of instance-based learning where the function is only approximated locally and all computation is deferred until function evaluation. This algorithm is simple but works surprisingly well in many data. The implementation of this algorithm could be found here
To visualize the performance between 2 classifiers, run
python optimal_bayes.py