nicolov / naive_bayes_tensorflow

Naive Bayes classifiers in TensorFlow
http://nicolovaligi.com/naive-bayes-tensorflow.html
18 stars 9 forks source link

Naive Bayes classifiers in TensorFlow

A simple [Naive Bayes classifier]() in TensorFlow 1.4. It's a tidy demonstration of tf.distributions and some unusual tensor operations.

For more information, you can read the blog post.

Getting started

Prepare the Python environment:

# Create a new virtualenv
mkvirtualenv env
source env/bin/activate
# Install requirements
pip install -r requirements.txt

And run the classifier:

python tf_iris.py