Class/Object

classifiers

NaiveBayesClassifier

Related Docs: object NaiveBayesClassifier | package classifiers

Permalink

class NaiveBayesClassifier extends Classifier

Naive Bayes classifier

Linear Supertypes
Classifier, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NaiveBayesClassifier
  2. Classifier
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NaiveBayesClassifier(json: JsValue)

    Permalink
  2. new NaiveBayesClassifier(model: String = NaiveBayesClassifier.model, priors: List[Double] = NaiveBayesClassifier.priors, alpha: Double = NaiveBayesClassifier.alpha, degree: Int = NaiveBayesClassifier.degree)

    Permalink

    model

    The distribution function to assume for the feature distributions

    priors

    Prior probabilities to assume for the classes

    alpha

    Additive (Laplace/Lidstone) smoothing parameter (0 for no smoothing)

    degree

    Order of polynomial features to add to the instances (1 for no addition)

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def _predict(X: List[List[Double]]): List[Int]

    Permalink
  5. def _train(X: List[List[Double]], y: List[Int]): Unit

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def diagnostics(): Map[String, List[(Double, Double)]]

    Permalink

    Provides meta-information on the classifier

    Provides meta-information on the classifier

    returns

    Map object of metric names and metric values

    Definition Classes
    Classifier
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def getLikeli(x: List[Double]): List[List[Double]]

    Permalink

    Calculates the per class and per feature likelihood value of a given instance

  14. def getProbabs(x: List[Double]): List[Double]

    Permalink

    Calculates the probabilities of belonging to a class for a given instance

    Calculates the probabilities of belonging to a class for a given instance

    This bases on Bayes theorem: p(C | x) = p(x | C) * p(C) / const using the naive assumption, that p(x0, ..., xn | C) * p(C) = p(C) * p(x0 | C) * ... * p(xn | C). The constant factor is neglected.

  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. val name: String

    Permalink

    The name of the classifier

    The name of the classifier

    Definition Classes
    NaiveBayesClassifierClassifier
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. var params: List[List[List[Double]]]

    Permalink

    Parameters for the likelihood for each class and feature

  22. def predict(X: List[List[Double]]): List[Int]

    Permalink

    Applies the trained classifier to a dataset

    Applies the trained classifier to a dataset

    X

    List of data instances

    returns

    List of predictions

    Definition Classes
    NaiveBayesClassifierClassifier
  23. var prior: List[Double]

    Permalink

    Prior probability for the classes

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def train(X: List[List[Double]], y: List[Int], sampleWeight: List[Double] = Nil): Unit

    Permalink

    Performs the training of the classifier

    Performs the training of the classifier

    X

    List of training instances

    y

    List of training labels

    Definition Classes
    NaiveBayesClassifierClassifier
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Classifier

Inherited from AnyRef

Inherited from Any

Ungrouped