oml
Math Library
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library oml
Parameters
module D : Input_interfaces.Dummy_encoded_data
Signature
include Classifier_interfaces.Generative
with type feature = D.feature
and type class_ = D.class_
and type feature_probability = float array
include Classifier_interfaces.Classifier
with type feature = D.feature
with type class_ = D.class_
val eval : t -> feature -> class_ Probabilities.t
eval classifier feature
assign probabilities to the possible classes based upon feature
.
estimate opt classes samples
estimates a classifier based upon the training samples
.
classes
is an optional argument to specify ahead of time the possible classes to train on (defaults to the ones found in the training data). This is useful for models where we know the population domain but may not see an example of a training datum for rare cases.
opt
are the optional classifier dependent estimation/evaluation arguments.
val class_probabilities :
t ->
class_ ->
float * ( feature -> feature_probability )
class_probabilities t class
returns the prior and per feature likelihood probability (ies) learned by t
for class
.
val opt : ?smoothing:float -> ?bernoulli:bool -> unit -> opt
opt ~smoothing ~bernoulli ()
the optional configuration of the classifier.