JSMILE Learning: NaiveBayes

From DSL

Jump to: navigation, search

This class implements a Naive Bayes learning algorithm.

[edit] Inner Classes

PriorsType

This class holds the names of prior methods: K2, BDeu.


[edit] Methods

  • String getClassVariableId()

void setClassVariable(String cls)

Indicates the class variable (default = "class").


  • boolean getFeatureSelection()

void setFeatureSelection(boolean value)

Determines if a feature selection algorithm should be used (default = false).


  • double getNetWeight()

void setNetWeight(double weight)

For BDeu priors it defines the weight assigned to the uniform priors (default = 1.0).


  • int getPriorsMethod()

void setPriorsMethod(int method)

Sets the priors method to use (default = K2). Use PriorType inner class.


  • Network learn(DataSet data)

Returns the learned Naive Bayes classifier. This method can throw a SmileException.

Personal tools