Letor: returning MSet after re-ranking

Ayush Tomar ayushtomar at gmail.com
Sun Jul 31 14:07:20 BST 2016


>
> Would a method which swapped two elements of an MSet provide what you
> need?  That would provide a more generic way to adjust the ranking of
> an MSet which for example could be used to implement a diversification
> feature or something like SQL "GROUP BY".
>

In addition to a method which swapped two elements of an MSet, what is a
required is a method that could update the weights of all MSetItem in an
MSet with the ones returned by letor. A method void
MSetIterator::set_weight(double letor_wt) could do that.

Once the weights have been updated, I could use void
MSet::exchange(MSetIterator &, MSetIterator &b) to write a sorting method
as part of any letor class to sort the MSet elements by weights, or maybe
as MSet::sort() method which performs this sorting directly, whichever way
it presents a broader use-case to users.

What do you think?

Regards,
Ayush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20160731/096b4cf9/attachment.html>


More information about the Xapian-devel mailing list