Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to store sets, to find similar patterns fast?
    primarykey
    data
    text
    <p>(This is no homework and no work issue. It's just my personal interest/occupation and completly fictional. But I am interested in a good algorithm or data structure.)</p> <p>Let's assume, that I would run a dating site. And my <strong><em>special feature</em></strong> would be that the singles were <strong>matched by movie taste</strong>. (Why not?)</p> <p>In that case I would need a way to store the movie ratings for each user. (So far no problem.) And I would need a data structure to find the best fitting user. The distance between two taste patterns would be the average distance between all ratings that both users made.</p> <p><strong>Example</strong></p> <pre><code>movies A B C D E F G H I J K L M ... user Xm 9 5 1 1 5 user Ym 4 6 1 8 user Zf 9 6 4 7 </code></pre> <p>Distance(X,Z) = avg( abs(9-9) + abs(1-4) ) = 1.5</p> <p>Distance(Y,Z) = avg( abs(4-6) + abs(6-4) + abs(8-7) ) = 1.666</p> <p>So Mr. X fits slightly better to Mrs. Z, than Mr. Y does. </p> <p><strong>I like soulution that ...</strong></p> <ul> <li>... don't need many operations on the database</li> <li>... don't need to handle a lot of data</li> <li>... run fast</li> <li>... deliver the best matching</li> <li>Ok, maybe I would consider good approximations too.</li> </ul> <p>Try to keep in mind that this should also work with thousands of possible movies, users that rate only about 20-50 movies, and thousands of users.</p> <p>(Because this is a mental puzzle and not a real problem, work-arrounds are not really helping.)</p> <p><strong>What would be your search algorithm or data structure?</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload