Skip to content

Instantly share code, notes, and snippets.

@virresh
virresh / README.md
Created March 20, 2020 14:18
Naive Bayes from scratch in Python

This implementation is not fully optimised, however it's meant to be readable enough to understand how naive bayes works without gaussian estimation.
It has some utility functions as well, such as Shuffler for k-fold train-test division and a Metrics class for computing ROC, DET and CMC curves along with helper functions for computing confusion matrices.
You can test it with MNIST/FMNIST dataset.

@base <http://example.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rel: <http://www.perceive.net/schemas/relationship/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#spiderman> a foaf:Person ;
rel:enemyOf <#green-goblin> ;
foaf:name "Человек-паук"@ru , "Spiderman" .