Sample model and feature file for xgboost that works with Elasticsearch LTR plugin?

68 Views Asked by At

For a linear model the details explained are pretty much clear where we have to specify weights in the model file for the corresponding features which are there in feature file.

I am referring to this xgboost example : https://github.com/o19s/elasticsearch-learning-to-rank/tree/main/demo/xgboost-demo

In the above demo if we see the model file which looks like this

[  { "nodeid": 0, "depth": 0, "split": "tmdb_multi", "split_condition": 11.2009, "yes": 1, "no": 2, "missing": 1, "children": [
    { "nodeid": 1, "depth": 1, "split": "tmdb_title", "split_condition": 2.20631, "yes": 3, "no": 4, "missing": 3, "children": [
      { "nodeid": 3, "leaf": -0.03125 },
      { "nodeid": 4, "leaf": -0.25 }
    ]},
    { "nodeid": 2, "leaf": 2.45 }
  ]},  { "nodeid": 0, "depth": 0, "split": "tmdb_title", "split_condition": 7.56362, "yes": 1, "no": 2, "missing": 1, "children": [
    { "nodeid": 1, "depth": 1, "split": "tmdb_multi", "split_condition": 11.2009, "yes": 3, "no": 4, "missing": 3, "children": [
      { "nodeid": 3, "leaf": -0.0165441 },
      { "nodeid": 4, "leaf": 0.04375 }
    ]},
    { "nodeid": 2, "leaf": 0.7 }
  ]}]

What will be the corresponding feature file for the same, are the values in split key field names?

Can someone give me a feature file that works with this model and also is this model complete? because the linear model had additional metadata as well which seems missing in this one.

0

There are 0 best solutions below