Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was about to <a href="https://stackoverflow.com/questions/8760570/how-to-provide-most-relevant-results-with-multiple-factor-weighted-sorting" title="I did end up asking the same question">ask the same question</a> about multiple-factor weighted sorting, because my research only came up with answers (e.g. formulas with explanations) for two-factor sorting.</p> <p>Even though we're both asking about 3 factors, I'll list the possibilities I've found in case they're helpful.</p> <p>Possibilities:</p> <p><em>Note: <code>S</code> is the "sorting score", which is what you'd sort by (asc or desc).</em></p> <ol> <li><strong>"Linearly weighted"</strong> - use a function like: <code>S = (w<sub>1</sub> * F<sub>1</sub>) + (w<sub>2</sub> * F<sub>2</sub>) + (w<sub>3</sub> * F<sub>3</sub>)</code>, where <code>w<sub>x</sub></code> are arbitrarily assigned weights, and <code>F<sub>x</sub></code> are the values of the factors. You'd also want to normalize <code>F</code> (i.e. <code>F<sub>x_n</sub> = F<sub>x</sub> / F<sub>max</sub></code>).</li> <li><strong>"Base-N weighted"</strong> - more like grouping than weighting, it's just a linear weighting where weights are increasing multiples of base-10 (a similar principle to <a href="http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/" rel="nofollow noreferrer" title="specificity of CSS explained">CSS selector specificity</a>), so that more important factors are significantly higher: <code>S = 1000 * F<sub>1</sub> + 100 * F<sub>2</sub> ...</code>.</li> <li><strong>Estimated True Value (ETV)</strong> - this is apparently what <a href="http://www.seomoz.org/blog/build-your-own-weighted-sort" rel="nofollow noreferrer" title="Explanation of ETV">Google Analytics introduced in their reporting</a>, where the value of one factor influences (<em>weights</em>) another factor - the consequence being to sort on more "statistically significant" values. The link explains it pretty well, so here's just the equation: <code>S = (F<sub>2</sub> / F<sub>2_max</sub> * F<sub>1</sub>) + ((1 - (F<sub>2</sub> / F<sub>2_max</sub>)) * F<sub>1_avg</sub>)</code>, where <code>F<sub>1</sub></code> is the "more important" factor ("bounce rate" in the article), and <code>F<sub>2</sub></code> is the "significance modifying" factor ("visits" in the article).</li> <li><strong>Bayesian Estimate</strong> - looks really similar to ETV, this is how IMDb calculates their rating. See <a href="https://stackoverflow.com/questions/1411199/what-is-a-better-way-to-sort-by-a-5-star-rating" title="What is a better way to sort 5-star rating">this StackOverflow post for explanation</a>; equation: <code>S = (F<sub>2</sub> / (F<sub>2</sub>+F<sub>2_lim</sub>)) * F<sub>1</sub> + (F<sub>2_lim</sub> / (F<sub>2</sub>+F<sub>2_lim</sub>)) × F<sub>1_avg</sub></code>, where <code>F<sub>x</sub></code> are the same as #3, and <code>F<sub>2_lim</sub></code> is the minimum threshold limit for the "significance" factor (i.e. any value less than X shouldn't be considered).</li> </ol> <p>Options #3 and #4 look really promising, since you don't really have to choose an arbitrary weighting scheme like you do in #1 and #2, but then the problem is how do you do this for more than two factors?</p> <p>In your case, assigning the weights in #1 would probably be fine. You'll need to fine-tune the algorithm depending on what your users consider more important - you could expose the weights <code>w<sub>x</sub></code> as a filter (like 1-10 dropdown) so your users can adjust their search on the fly. Or if you wanted to get clever you could poll your users before they're searching ("Which is more important to you?") and then assign a weighting set based on the response, and after tracking enough polls you could autosuggest the weighting scheme based on most responses.</p> <p>Hope that gets you on the right track.</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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