<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Bayes Classification in Ruby</title>
	<atom:link href="http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Fri, 04 Jul 2008 03:09:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Mike Subelsky</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-103832</link>
		<dc:creator>Mike Subelsky</dc:creator>
		<pubDate>Fri, 06 Jun 2008 15:34:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-103832</guid>
		<description>I was able to get this working;  all you have to do is run "Marshal.dump(classifier)" and store the output to a text column in your database.  For MySQL I got errors unless I made the column type "longtext", a la:

change_column :tags, :bayes_data, :longtext

Then to restore the classifier, you just do:

Marshal.load(bayes_data) and voila!</description>
		<content:encoded><![CDATA[<p>I was able to get this working;  all you have to do is run &#8220;Marshal.dump(classifier)&#8221; and store the output to a text column in your database.  For MySQL I got errors unless I made the column type &#8220;longtext&#8221;, a la:</p>
<p>change_column :tags, :bayes_data, :longtext</p>
<p>Then to restore the classifier, you just do:</p>
<p>Marshal.load(bayes_data) and voila!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-103827</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Fri, 06 Jun 2008 12:10:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-103827</guid>
		<description>Thanks for the tip Mike!</description>
		<content:encoded><![CDATA[<p>Thanks for the tip Mike!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Subelsky</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-103582</link>
		<dc:creator>Mike Subelsky</dc:creator>
		<pubDate>Fri, 30 May 2008 13:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-103582</guid>
		<description>...also dump total words, forgot that one as well.</description>
		<content:encoded><![CDATA[<p>&#8230;also dump total words, forgot that one as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Subelsky</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-103580</link>
		<dc:creator>Mike Subelsky</dc:creator>
		<pubDate>Fri, 30 May 2008 13:00:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-103580</guid>
		<description>For the people who want to persist to a database, you can't use SnapshotMadeline.  You need to add custom dump and load methods to the Classifier class. Looking at the implementation of the Bayes classifier, it seems like only the @categories instance variable needs to be dumped and reloaded to reconstitute the learning set.  This fragment from the Pickaxe should help you get started: &lt;a href="///Users/mike/Documents/References/ruby/ruby-doc-bundle/ProgrammingRuby/book/ospace.html#S6" rel="nofollow"&gt;Marshalling in Ruby&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>For the people who want to persist to a database, you can&#8217;t use SnapshotMadeline.  You need to add custom dump and load methods to the Classifier class. Looking at the implementation of the Bayes classifier, it seems like only the @categories instance variable needs to be dumped and reloaded to reconstitute the learning set.  This fragment from the Pickaxe should help you get started: <a href="///Users/mike/Documents/References/ruby/ruby-doc-bundle/ProgrammingRuby/book/ospace.html#S6" rel="nofollow">Marshalling in Ruby</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-102950</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Sat, 03 May 2008 23:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-102950</guid>
		<description>Daniel, you might want to contact the author with your implementation then -- that way everyone gets the updated gem.</description>
		<content:encoded><![CDATA[<p>Daniel, you might want to contact the author with your implementation then &#8212; that way everyone gets the updated gem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-102790</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 28 Apr 2008 15:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-102790</guid>
		<description>as I already wrote in this thread I have reviewed the source line by line; the awful results just ringed a bell;

sorry but this program implements anything but a bayesian filter.</description>
		<content:encoded><![CDATA[<p>as I already wrote in this thread I have reviewed the source line by line; the awful results just ringed a bell;</p>
<p>sorry but this program implements anything but a bayesian filter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-102625</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Tue, 22 Apr 2008 03:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-102625</guid>
		<description>:) just because the algorithm did not give good accuracy on a dataset, doesn't mean the algorithm is broken. Having said that, if the algorithm is not working properly, and you can contribute to the source (sourceforge) to make it better, that would be awesome!</description>
		<content:encoded><![CDATA[<p>:) just because the algorithm did not give good accuracy on a dataset, doesn&#8217;t mean the algorithm is broken. Having said that, if the algorithm is not working properly, and you can contribute to the source (sourceforge) to make it better, that would be awesome!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-102520</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 17 Apr 2008 21:28:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-102520</guid>
		<description>that's what I imagined: a blind "implementation" of an algorithm the programmer does not seem to understand.</description>
		<content:encoded><![CDATA[<p>that&#8217;s what I imagined: a blind &#8220;implementation&#8221; of an algorithm the programmer does not seem to understand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-102487</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Wed, 16 Apr 2008 06:59:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-102487</guid>
		<description>Hummm. Daniel, it's been a while since I've touched that code, but the implementation was directly from the source (the 'AI bible', 2nd edition).</description>
		<content:encoded><![CDATA[<p>Hummm. Daniel, it&#8217;s been a while since I&#8217;ve touched that code, but the implementation was directly from the source (the &#8216;AI bible&#8217;, 2nd edition).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.igvita.com/2007/05/23/bayes-classification-in-ruby/#comment-102325</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 07 Apr 2008 13:37:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/05/23/bayes-classification-in-ruby/#comment-102325</guid>
		<description>"Both gems implement the direct algorithms - probabilities and all"

Then please explain the presence of the logarithmic function applied in the "classification" function... Or maybe the "negative  probabilities" it outputs.</description>
		<content:encoded><![CDATA[<p>&#8220;Both gems implement the direct algorithms - probabilities and all&#8221;</p>
<p>Then please explain the presence of the logarithmic function applied in the &#8220;classification&#8221; function&#8230; Or maybe the &#8220;negative  probabilities&#8221; it outputs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
