Hi everyone,

I'm trying out the LTR plugin and have a couple questions when it comes to
converting the LambdaMart XML to JSON. Below is a snippet of the model
generated from rankLib:

<ensemble>
  <tree id="1" weight="0.1">
    <split>
      <feature> 10 </feature>
      <threshold> 0.28156844 </threshold>
      <split pos="left">
        <feature> 11 </feature>
        <threshold> 7.111111 </threshold>
        <split pos="left">
          <feature> 7 </feature>
          <threshold> 2.2759523 </threshold>
          <split pos="left">
            <output> 0.8436763 </output>
          </split>
          <split pos="right">
            <output> 1.4320849 </output>
          </split>
        </split>
----------------------

And a sample of training data:

1 qid:1 1:0.0 2:1.0 3:0.0 4:0.0 5:0.0 6:0.0 7:19.496738 8:0.0 9:0.0
10:0.08307255 11:7.111111 #docId: oeqzg5-165248

It's probably obvious, but I just want to check if the <feature> node in
the XML is referring to the ID in my training set and that it's possible
that the model doesn't use all features in the training data?

I'll be mapping these feature IDs with the names I gave them in the feature
store in Solr..

Is there a script or utility already made out there to convert the XML to
this Solr JSON format? The closest I found to something was this:
https://sourceforge.net/p/lemur/feature-requests/144/

Thanks for your help!

Ryan

Reply via email to