Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: [ANN| Bayesian Classification for Ruby
Peña, Botp
4/12/2005 3:32:00 AM
Matt Mower [mailto:matt.mower@gmail.com] wrote:
#>
http://rubyforge.org/projects/c...
#>
#
#;-)
#
#I ported the Reverend bayesian classifier from Python to Ruby
#over the weekend. If only I'd waited ;-)
did you finished the port? Are you using it?
i'm asking since i'm using outlook spambayes wc is pure python....
kind regards -botp
#
#M
#
#--
#Matt Mower ::
http://matt...
#
1 Answer
Matt Mower
4/12/2005 7:48:00 AM
0
On Apr 12, 2005 4:32 AM, "Peña, Botp" <botp@delmonte-phil.com> wrote:
> Matt Mower [mailto:matt.mower@gmail.com] wrote:
>
> #>
http://rubyforge.org/projects/c...
> #>
> #
> #;-)
> #
> #I ported the Reverend bayesian classifier from Python to Ruby
> #over the weekend. If only I'd waited ;-)
>
> did you finished the port? Are you using it?
>
Yes I finished porting the code and it seems to work for the Robinson
method although what I haven't done yet is verify that it produces the
same results as Reverend, i.e. have I ported it properly? Using the
Robinson-Fisher method doesn't seem to work so I think I need to go
back and look at my implementation of that algorithm again.
Here is Lucas' example using Bishop:
require 'bishop'
# The block passed here is actually mimicing the default behaviour however
# I add it here to show how the probability combiner algorithm is replaced,
# e.g. with Bishop::robinson_fisher
b = Bishop::Bayes.new { |probs,ignore| Bishop::robinson( probs, ignore ) }
b.train( "interesting", "here are some good words. I hope you love them" )
b.train( "uninteresting", "here are some bad words, I hate you" )
b.guess( "I hate bad words and you" ).each { |c| puts c.join( " = " ) }
outputs
uninteresting = 0.9999
Is there anyone with some python savvy who'd like to collaborate on testing?
M
--
Matt Mower ::
http://matt...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: [ANN| Bayesian Classification for Ruby
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password