A fast and flexible Bayesian Naive Bayes implementation for the JVM written in Kotlin.
Get the latest artifact from maven central
//Java 9
Model model = new Model().batchAdd(List.of(new Update( //Models are immutable
new Inputs( // Supports multiple feature types
Map.of( //Text features
"subject", "Attention, is it true?", //features are named.
"body", "Good day dear beneficiary. This is Secretary to president of Benin republic is writing this email ..." // multiple features of the same type have different names
),
Map.of( //Categorical features
"sender", "WWW.@galaxy.ocn.ne.jp"
),
Map.of( //Gaussian features
"n_words", 482.
)
),
"spam" // the outcome, in this case spam.
)));
Map<String, Double> predictions = model.predict(new Inputs(/*...*/));// e.g. {"spam": 0.624, "ham": 0.376}
We use SemVer for versioning.
<sonatype_user>
and <sonatype_pwd
, respectively.Publishing Support
requesting access to com.tradeshift.blayze
.
It must be approved by an existing user with write access. It can take a couple of days before access is granted.pom.xml
along with the code changes. Merge it to master
or v4
once it is approved. gpg --gen-key
gpg --list-keys
<gpg_key_id>
from now<sonatype_pwd>
using mvn --encrypt-password
. The encrypted value is referred to as <sonatype_pwd_enc>
~/.m2/settings.xml
<settings>
<servers>
<server>
<id>ossrh-blayze</id>
<username><sonatype_user></username>
<password><sonatype_pwd_enc></password>
</server>
</servers>
</settings>
mvn clean deploy -P release -Dgpg.keyname=<gpg_key_id>
We publish security updates for major version 4.x.x
(branch v4
) as well as 6.x.x
(branch master
)