however this (to me) sounds like neural net processing , or Expert Systems processing to some extent.
you may also wish to look into Baye's theorem (new scientist july 2011), i don't know if its related to the pearson coefficient...
good luck
SELECT
user1, user2,
((psum - (sum1 * sum2 / n)) / sqrt((sum1sq - pow(sum1, 2.0) / n) * (sum2sq - pow(sum2, 2.0) / n))) AS r,
n
FROM
(SELECT
n1.user AS user1,
n2.user AS user2,
SUM(n1.rating) AS sum1,
SUM(n2.rating) AS sum2,
SUM(n1.rating * n1.rating) AS sum1sq,
SUM(n2.rating * n2.rating) AS sum2sq,
SUM(n1.rating * n2.rating) AS psum,
COUNT(*) AS n
FROM
testdata AS n1
LEFT JOIN
testdata AS n2
ON
n1.movie = n2.movie
WHERE
n1.user > n2.user
GROUP BY
n1.user, n2.user) AS step1
ORDER BY
r DESC,
n DESC
Title | # Comments | Views | Activity |
---|---|---|---|
How to know which tables getting lock escalation | 4 | 34 | |
Trouble understanding equation involving ampersand | 5 | 68 | |
Save sql query result in sql server | 15 | 22 | |
How many Lat/Long for a single UK Postcode | 5 | 9 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
11 Experts available now in Live!