NaiveBayes

public final class NaiveBayes implements Classifier

A Naïve Bayes Classifier that is using Laplacian Smoothing.

Constructors

Link copied to clipboard
public NaiveBayes NaiveBayes()

Functions

Link copied to clipboard
public Unit fit(MultiArray<Float, D2> X, NDArray<Integer, D2> y)
Link copied to clipboard
public final NDArray<Float, D2> getLogLambda()
Link copied to clipboard
public final Float getLogPrior()
Link copied to clipboard
public NDArray<Integer, D2> predict(MultiArray<Float, D2> X)
Link copied to clipboard
public final NDArray<Float, D2> predictProba(NDArray<Float, D2> X)
Link copied to clipboard
public final Unit setLogLambda(NDArray<Float, D2> logLambda)
Link copied to clipboard
public final Unit setLogPrior(Float logPrior)

Properties

Link copied to clipboard
private NDArray<Float, D2> logLambda
Link copied to clipboard
private Float logPrior