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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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" . |