Skip to content

Instantly share code, notes, and snippets.

@metal3d
metal3d / bayesian.py
Last active December 11, 2015 21:08
Bayesian class that train datas and compute bayesian calculation.
# -*- encoding: utf-8 -*-
""" Simple Bayesian calculation
After training datas by categories, you can use Bayes.bayes method to compute
bayesian calculation to find probality for a content
matches some categories
Example:
>>> b = Bayes()