nlp
1.2.0
nlp
/
com.londogard.nlp.meachinelearning.predictors.classifiers
/
NaiveBayes
Naive
Bayes
public
final
class
NaiveBayes
implements
Classifier
Content copied to clipboard
A
Naïve Bayes Classifier
that is using Laplacian Smoothing.
Constructors
Functions
Properties
Constructors
Naive
Bayes
Link copied to clipboard
public
NaiveBayes
NaiveBayes
(
)
Content copied to clipboard
Functions
fit
Link copied to clipboard
public
Unit
fit
(
MultiArray
<
Float
,
D2
>
X
,
NDArray
<
Integer
,
D2
>
y
)
Content copied to clipboard
get
Log
Lambda
Link copied to clipboard
public
final
NDArray
<
Float
,
D2
>
getLogLambda
(
)
Content copied to clipboard
get
Log
Prior
Link copied to clipboard
public
final
Float
getLogPrior
(
)
Content copied to clipboard
predict
Link copied to clipboard
public
NDArray
<
Integer
,
D2
>
predict
(
MultiArray
<
Float
,
D2
>
X
)
Content copied to clipboard
predict
Proba
Link copied to clipboard
public
final
NDArray
<
Float
,
D2
>
predictProba
(
NDArray
<
Float
,
D2
>
X
)
Content copied to clipboard
set
Log
Lambda
Link copied to clipboard
public
final
Unit
setLogLambda
(
NDArray
<
Float
,
D2
>
logLambda
)
Content copied to clipboard
set
Log
Prior
Link copied to clipboard
public
final
Unit
setLogPrior
(
Float
logPrior
)
Content copied to clipboard
Properties
log
Lambda
Link copied to clipboard
private
NDArray
<
Float
,
D2
>
logLambda
Content copied to clipboard
log
Prior
Link copied to clipboard
private
Float
logPrior
Content copied to clipboard