项目作者: khuyentran1401

项目描述 :
The implementation and comparison of Optimal Bayes with symmetric loss and KNN Classifier
高级语言: Python
项目地址: git://github.com/khuyentran1401/KNN-and-Bayes-Classifier.git
创建时间: 2020-05-02T19:57:04Z
项目社区:https://github.com/khuyentran1401/KNN-and-Bayes-Classifier

开源协议:

下载


KNearest Neighbor Classifier and Bayes Classifier

This repo compares optimal bayes classifier-a probabilistic approach and knearest neighbor classifier-a geometric approach

Optimal Bayes Classifier

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 Nearest Neighbor Classifier

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

Comparision betweetn 2 classifier

To visualize the performance between 2 classifiers, run

  1. python optimal_bayes.py

image