Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ruby bayes naive classifier implementation that uses Redis as backend
branch: master

This branch is even with hungryblank:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
rrbayes.gemspec

README.rdoc

Rrbayes (Ruby Redis Bayes)

Description

Rrbayes is a basic and simplified implementation of a naive bayesian classifier.

It uses Redis github.com/antirez/redis to store the information necessary for the classification, this gives Rrbayes persistency and parallel processing support

Rrbayes has been inspired by github.com/cardmagic/classifier

Development status

At this stage Rrbayes is more than anything else an excuse to use Redis

Usage

require 'rrbayes'

classifier = Rrbayes::Classifier.new :categories => :spam, :ham

classifier.learn({'enlarge' => 1, 'your' => 2 ,'viagra' => 3} :as => 'spam')

classifier.learn({'dear' => 1, 'Jon' => 2 ,'how' => 3}, :as => 'ham'))

classifier.classify({'viagra' => 1, 'cheap' => 1})
=> 'spam'

Thanks

Author

Copyright © 2009 hungryblank. See LICENSE for details.

Something went wrong with that request. Please try again.