Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
ai.bleckwen:xgboost-predictor4j
Advanced tools
Bleckwen JVM implementation of XGBoost Predictor
Features
libgomp
)predictApproxContrib
) and slower SHAP algorithm (predictContrib
)Limitations
rewind
is not implemented).
The impact is negligeable as it happens in very rare situation (a comparison with XGBoots4J performed on 1_000_000 random records did not show any discrepancy)Release History
Integration
<dependency>
<groupId>ai.bleckwen</groupId>
<artifactId>xgboost-predictor4j</artifactId>
<version>1.0</version>
</dependency>
libraryDependencies += "ai.bleckwen" % "xgboost-predictor4j" % "1.0"
The package was build and published wih Scala 2.12.13 but you can rebuild it with Scala 2.13 by using Maven profile scala213
or by using the Makefile goal.
Using Predictor in Scala
val bytes = org.apache.commons.io.IOUtils.toByteArray(this.getClass.getResourceAsStream("/path_to.model"))
val predictor = Predictor(bytes)
val denseArray = Array(0.23, 0.0, 1.0, 0.5)
val score = predictor.predict(denseArray).head
Using Predictor in Java
byte[] bytes = org.apache.commons.io.IOUtils.toByteArray(this.getClass().getResourceAsStream("/path_to.model"));
Predictor predictor = (new PredictorBuilder()).build(bytes) ;
double[] denseArray = {0, 0, 32, 0, 0, 16, -8, 0, 0, 0};
double score = predictor.predict(denseArray)[0];
Benchmarks
See BENCH.md
FAQs
Bleckwen JVM implementation of XGBoost Predictor
We found that ai.bleckwen:xgboost-predictor4j demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.