* normalized expected scores if min is < 0
* only normalize scores for ES after 8.19+ / 9.1+
* add 9.1.0 snapshot to build matrix
* get min score from booster trees
* removing typing on function definition
* properly flatten our tree leaf scores
* simplify getting min score
* debugging messages
* get all the matches in better way
* Fix model score normalization.
* lint
* lint again
* lint; correct return for bounds map/list
* revert to Aurelian's fix
* re-lint :/
---------
Co-authored-by: Aurelien FOUCRET <aurelien.foucret@elastic.co>
* Revert "[ML] Export ML model as sklearn Pipeline (#509)"
This reverts commit 0576114a1d886eafabca3191743a9bea9dc20b1a.
* Keep useful changes
* formatting
* Remove obsolete test matrix configuration and update version references in documentation and Noxfile
* formatting
---------
Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
* Ensure the feature logger is using NaN for non matching query feature extractors (consistent with ES).
* Default score is None instead of 0.
* LTR model import API improvements.
* Fix feature logger tests.
* Fix export in eland.ml.ltr
* Apply suggestions from code review
Co-authored-by: Adam Demjen <demjened@gmail.com>
* Fix supported models for LTR
---------
Co-authored-by: Adam Demjen <demjened@gmail.com>
* Add XGBRanker and transformer
* Map XGBoostRegressorTransformer to XGBRanker
* Add unit tests
* Remove unused import
* Revert addition of type
* Update function comment
* Distinguish objective based on model class
* Support for supplying inference_config
* Fix linting errors
* Add unit test
* Add LTR type, throw exception on predict, refine test
* Add search step to LTR test
* Fix linter errors
* Update rescoring assertion in test + type defs
* Fix linting error
* Remove failing assertion
Closes#503
Note: I also had to fix the Sphinx version to 5.3.0 since, starting from 6.0, Sphinx suffers from a TypeError bug, which causes a CI failure.
This switches our sklearn.DecisionTreeClassifier serialization logic to account for multi-valued leaves in the tree.
The key difference between our inference and DecisionTreeClassifier, is that we run a softMax over the leaf where sklearn simply normalizes the results.
This means that our "probabilities" returned will be different than sklearn.