Skip to content

Commit 4e39eb8

Browse files
authored
Fix irreproducible inference due to the imprecise floating point values 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
1 parent 6a0364c commit 4e39eb8

File tree

3 files changed

+1005
-0
lines changed

3 files changed

+1005
-0
lines changed

src/main/java/com/o19s/es/ltr/LtrQueryParserPlugin.java

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import com.o19s.es.ltr.ranker.parser.LinearRankerParser;
4848
import com.o19s.es.ltr.ranker.parser.LtrRankerParserFactory;
4949
import com.o19s.es.ltr.ranker.parser.XGBoostJsonParser;
50+
import com.o19s.es.ltr.ranker.parser.XGBoostRawJsonParser;
5051
import com.o19s.es.ltr.ranker.ranklib.RankLibScriptEngine;
5152
import com.o19s.es.ltr.ranker.ranklib.RanklibModelParser;
5253
import com.o19s.es.ltr.rest.RestCreateModelFromSet;
@@ -129,6 +130,7 @@ public LtrQueryParserPlugin(Settings settings) {
129130
.register(RanklibModelParser.TYPE, () -> new RanklibModelParser(ranklib.get()))
130131
.register(LinearRankerParser.TYPE, LinearRankerParser::new)
131132
.register(XGBoostJsonParser.TYPE, XGBoostJsonParser::new)
133+
.register(XGBoostRawJsonParser.TYPE, XGBoostRawJsonParser::new)
132134
.build();
133135
}
134136

0 commit comments

Comments
 (0)