Skip to content

Commit

Permalink
Fix irreproducible inference due to the imprecise floating point valu…
Browse files Browse the repository at this point in the history
…es in xgboost's get_dump (#500)

Add new parser `model/xgboost+json+raw` to support xgboost's JSON output when using `get_dump` 

fixes #497
  • Loading branch information
pltb authored Nov 4, 2024
1 parent 6a0364c commit 4e39eb8
Show file tree
Hide file tree
Showing 3 changed files with 1,005 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/o19s/es/ltr/LtrQueryParserPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import com.o19s.es.ltr.ranker.parser.LinearRankerParser;
import com.o19s.es.ltr.ranker.parser.LtrRankerParserFactory;
import com.o19s.es.ltr.ranker.parser.XGBoostJsonParser;
import com.o19s.es.ltr.ranker.parser.XGBoostRawJsonParser;
import com.o19s.es.ltr.ranker.ranklib.RankLibScriptEngine;
import com.o19s.es.ltr.ranker.ranklib.RanklibModelParser;
import com.o19s.es.ltr.rest.RestCreateModelFromSet;
Expand Down Expand Up @@ -129,6 +130,7 @@ public LtrQueryParserPlugin(Settings settings) {
.register(RanklibModelParser.TYPE, () -> new RanklibModelParser(ranklib.get()))
.register(LinearRankerParser.TYPE, LinearRankerParser::new)
.register(XGBoostJsonParser.TYPE, XGBoostJsonParser::new)
.register(XGBoostRawJsonParser.TYPE, XGBoostRawJsonParser::new)
.build();
}

Expand Down
Loading

0 comments on commit 4e39eb8

Please sign in to comment.