<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP Content Rating / Confidence</title>
	<atom:link href="http://www.derivante.com/2009/09/01/php-content-rating-confidence/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/</link>
	<description>to obtain or receive from a source</description>
	<lastBuildDate>Sat, 30 Jul 2011 08:51:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Alix Axel</title>
		<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/comment-page-1/#comment-573</link>
		<dc:creator>Alix Axel</dc:creator>
		<pubDate>Fri, 15 Apr 2011 12:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.derivante.com/?p=717#comment-573</guid>
		<description>Just a quick note: if you have the stats extension installed you can replace the pnormaldist() function with a call to the built-in function stats_cdf_normal($power, 0, 1, 2).

In my tests it has proven to be slightly more accurate than the pnormaldist() implementation.</description>
		<content:encoded><![CDATA[<p>Just a quick note: if you have the stats extension installed you can replace the pnormaldist() function with a call to the built-in function stats_cdf_normal($power, 0, 1, 2).</p>
<p>In my tests it has proven to be slightly more accurate than the pnormaldist() implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: i-g</title>
		<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/comment-page-1/#comment-372</link>
		<dc:creator>i-g</dc:creator>
		<pubDate>Sat, 24 Oct 2009 06:01:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.derivante.com/?p=717#comment-372</guid>
		<description>What is the significance of the numbers that you populate into the $b array? I don&#039;t understand where they come from.</description>
		<content:encoded><![CDATA[<p>What is the significance of the numbers that you populate into the $b array? I don&#8217;t understand where they come from.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Errante</title>
		<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/comment-page-1/#comment-350</link>
		<dc:creator>Daniel Errante</dc:creator>
		<pubDate>Sat, 03 Oct 2009 22:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.derivante.com/?p=717#comment-350</guid>
		<description>Ok, that answers my question. Thanks for all the information! I have another question though:

What if I just want to add the gravity part to the MySQL query? For example, if I already have my score variable as $score, and i have the date as add_date, how do I weight newer content to show up higher in the results and then slowly fall back into place over time?</description>
		<content:encoded><![CDATA[<p>Ok, that answers my question. Thanks for all the information! I have another question though:</p>
<p>What if I just want to add the gravity part to the MySQL query? For example, if I already have my score variable as $score, and i have the date as add_date, how do I weight newer content to show up higher in the results and then slowly fall back into place over time?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clay vanSchalkwijk</title>
		<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/comment-page-1/#comment-295</link>
		<dc:creator>Clay vanSchalkwijk</dc:creator>
		<pubDate>Fri, 18 Sep 2009 13:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.derivante.com/?p=717#comment-295</guid>
		<description>You could port the formula to a stored procedure but if you&#039;re concerned about the time it takes to process the result set into a cache, doing it on the fly on every record each time will be far worse. 

My recommendation would be to just have a hook into your voting to recalculate just the row being voted on and process any record within your decay time through cron.

After the decay time, the score should not change until a vote is issued so there is no point to re-calculate this on the fly and the newer records will represent a smaller subset of your overall data which should reduce the number of records you need to process.

If you do want to port over the code above, all the math functions are available within SQL:

http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html

http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html</description>
		<content:encoded><![CDATA[<p>You could port the formula to a stored procedure but if you&#8217;re concerned about the time it takes to process the result set into a cache, doing it on the fly on every record each time will be far worse. </p>
<p>My recommendation would be to just have a hook into your voting to recalculate just the row being voted on and process any record within your decay time through cron.</p>
<p>After the decay time, the score should not change until a vote is issued so there is no point to re-calculate this on the fly and the newer records will represent a smaller subset of your overall data which should reduce the number of records you need to process.</p>
<p>If you do want to port over the code above, all the math functions are available within SQL:</p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html</a></p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: danoph</title>
		<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/comment-page-1/#comment-291</link>
		<dc:creator>danoph</dc:creator>
		<pubDate>Fri, 18 Sep 2009 03:27:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.derivante.com/?p=717#comment-291</guid>
		<description>Is there a way that the formula could be written to support real time calculating? I need a one-liner solution that favors more popular items but also throws newer results in the top of the mix and decays those results over time, like you mentioned above. I could solve this problem by caching these values, but I would have to update a database of tens of thousands of records multiple times a day, correct? I am using the expression sorting method as mentioned here in my search engine: http://www.sphinxsearch.com/docs/current.html#sorting-modes</description>
		<content:encoded><![CDATA[<p>Is there a way that the formula could be written to support real time calculating? I need a one-liner solution that favors more popular items but also throws newer results in the top of the mix and decays those results over time, like you mentioned above. I could solve this problem by caching these values, but I would have to update a database of tens of thousands of records multiple times a day, correct? I am using the expression sorting method as mentioned here in my search engine: <a href="http://www.sphinxsearch.com/docs/current.html#sorting-modes" rel="nofollow">http://www.sphinxsearch.com/docs/current.html#sorting-modes</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clay vanSchalkwijk</title>
		<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/comment-page-1/#comment-264</link>
		<dc:creator>Clay vanSchalkwijk</dc:creator>
		<pubDate>Sun, 13 Sep 2009 00:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.derivante.com/?p=717#comment-264</guid>
		<description>You do not want to do this calculation on the fly with MySQL.  It makes more sense to cache the score and let MySQL handle the sorting.  

Otherwise you are calculating scoring for each row on each page load.  This will seriously hurt your application performance.</description>
		<content:encoded><![CDATA[<p>You do not want to do this calculation on the fly with MySQL.  It makes more sense to cache the score and let MySQL handle the sorting.  </p>
<p>Otherwise you are calculating scoring for each row on each page load.  This will seriously hurt your application performance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Errante</title>
		<link>http://www.derivante.com/2009/09/01/php-content-rating-confidence/comment-page-1/#comment-255</link>
		<dc:creator>Daniel Errante</dc:creator>
		<pubDate>Wed, 09 Sep 2009 07:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.derivante.com/?p=717#comment-255</guid>
		<description>How would I go about implementing a MySQL version of the wilson score interval?</description>
		<content:encoded><![CDATA[<p>How would I go about implementing a MySQL version of the wilson score interval?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
