22
33[ ![ CI Status] ( https://github.com/metarank/ltrlib/workflows/CI/badge.svg )] ( https://github.com/metarank/ltrlib/actions )
44[ ![ License: Apache 2] ( https://img.shields.io/badge/License-Apache2-green.svg )] ( https://opensource.org/licenses/Apache-2.0 )
5+ ![ Last release] ( https://img.shields.io/github/release/metarank/ltrlib )
56
67A Java/Scala library to wrap and implement basic learn-to-rank ML algorithms under the same
78human-friendly API. Currently, is under an active development.
@@ -19,15 +20,15 @@ human-friendly API. Currently, is under an active development.
1920
2021libLTR is published to maven-central for scala 3.x, 2.12 and 2.13, so for SBT, add this snippet to ` build.sbt ` :
2122``` scala
22- libraryDependencies += " io.github.metarank" %% " ltrlib" % " 0.1.22 "
23+ libraryDependencies += " io.github.metarank" %% " ltrlib" % " 0.2.0 "
2324```
2425
2526For maven:
2627``` xml
2728<dependency >
2829 <groupId >io.github.metarank</groupId >
2930 <artifactId >ltrlib_2.13</artifactId >
30- <version >0.1.22 </version >
31+ <version >0.2.0 </version >
3132</dependency >
3233```
3334## Usage
@@ -42,9 +43,9 @@ val spec = DatasetDescriptor((1 to 46).map(i => SingularFeature(s"f$i")).toLi
4243val dataset = Dataset (spec, loader.load(spec))
4344
4445// configured booster
45- val lm = LambdaMART (dataset, LightGBMOptions (), LightGBMBooster )
46+ val lm = LambdaMART (dataset, LightGBMBooster )
4647// trained model
47- val model = lm.fit()
48+ val model = lm.fit(LightGBMOptions () )
4849// NDCG error with cutoff on 10th position
4950val error = lm.eval(model, dataset, NDCG (10 ))
5051
0 commit comments