[Xapian-devel] LTR

Parth Gupta parthg.88 at gmail.com
Thu May 31 11:04:02 BST 2012


At max what you can do is to leave the method definitions of svmranker as
blank and start working with Listnet and ListMle class with this
architecture.. We can fill the methods of svmranke later..

A quick glance at the code in the github says:

1. The class definition of methods in featuremanager.cc is still
Letor::Internal which should be changed to appropriate class
2. you have copy pasted the code from letor::internal to the refactored
classes, no you need to declare/define them according to the refactored
classes..
3. The ranker.cc should be used to access any subclass like svmranker or
future listnetraker rather than declaring SVMRanker directly in
letor_internal.cc
4. These are small issues of OOP which should be quite straight forward to
handle
5. Please draw the OO architecture which we had discussed on the paper and
then start correcting these small errors.

Parth.

On Thu, May 31, 2012 at 11:52 AM, Parth Gupta <parthg.88 at gmail.com> wrote:

> Hi Rishabh,
>
> Very nice, As I said, you will need to change the parameters of the
> methods as you go, you can safely change the questletor accordingly. The
> linking in C++ might be different than Java, so you should start reading a
> bit about it and feel free to ask us at the IRC or here if you get stuck.
>
> Basically in the score() or the letor_score() the mset is transformed into
> the appropriate format for libsvm and it is passed to it to get the
> predicted label which is set back in the form of Map<docid, score>.
>
> I might not get the chance to look at the code for a couple of days, so
> best thing would be to just pass through our last discussion at IRC about
> the code and you should be fine, because in that we discussed the modules
> in quite detail. You might need to remove or add some variables according
> to the need. Olly might be able to help you with the linking part.
>
> Parth.
>
>
> On Thu, May 31, 2012 at 11:24 AM, Rishabh Mehrotra <erishabh at gmail.com>wrote:
>
>> Hello,
>>
>> I had updated my fork at Git with the some what refactored code. Some
>> errors still need to be removed. As of now I haven't modified the
>> prepare_training_file method in letor_internals.cc at all.
>>
>> letor_score used to return a map<docid,double> and questletor was based
>> on this structure, but when wehave ranklists this needed to change, but
>> then I would have had to change the questletor file which I didn't want
>> to(you had mentioned that letor.cc and questletor.cc will remain the same).
>> I think this can be done once this refactored code is running properly.
>>
>> Also, in the SVMRanker.cc file, the rank function should have taken in
>> Ranklist rl only as the parameter but as I wasn't able to understand the
>> functioning of the code written inside letor_score(= now inside rank()) so
>> as a temporary measure I have passed mset as well inside the rank function.
>>
>> Please have a look at the overall structure now and let me know the
>> errors(linking part still needs to be done-C++ linking isn't much similar
>> to Java). Also please have a look at SVMRanker.cc 's rank function and
>> letor_internals.cc's prepare_training_file function as you would easily get
>> to know what changes needs to be done in these methods, I didn't get much
>> out of the code written in these modules.
>>
>> Regards,
>>
>>
>>
>> --
>> Rishabh.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20120531/f0f9cb46/attachment.htm>


More information about the Xapian-devel mailing list