Nasty.AST.ClassificationModel (Nasty v0.3.0)
View SourceClassification model containing learned parameters for prediction.
Stores the trained model parameters including class priors, feature probabilities, and vocabulary for making predictions on new documents.
Summary
Functions
Creates a new classification model.
Checks if the model has been trained (has learned parameters).
Types
@type algorithm() :: :naive_bayes | :svm | :logistic_regression
Classification algorithm type.
Functions
Creates a new classification model.
Examples
iex> model = Nasty.AST.ClassificationModel.new(:naive_bayes, [:spam, :ham])
iex> model.algorithm
:naive_bayes
iex> model.classes
[:spam, :ham]
Checks if the model has been trained (has learned parameters).
Examples
iex> model = Nasty.AST.ClassificationModel.new(:naive_bayes, [:spam, :ham])
iex> Nasty.AST.ClassificationModel.trained?(model)
false