scalation.analytics

BayesNetwork

Related Doc: package analytics

class BayesNetwork extends Classifier with Error

The BayesNetwork class implements a Bayesian Network Classifier. It classifies a data vector 'z' by determining which of 'k' classes has the highest Joint Probability of 'z' and the outcome (i.e., one of the 'k' classes) of occurring. The Joint Probability calculation is factored into multiple calculations of Conditional Probability. Conditional dependencies are specified using a Directed Acyclic Graph (DAG). Nodes are conditionally dependent on their parents only. Conditional probability are recorded in tables. Training is achieved by ...

Linear Supertypes
Error, Classifier, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BayesNetwork
  2. Error
  3. Classifier
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BayesNetwork(dag: DAG, table: Array[Map[Int, Double]], k: Int, cn: Array[String])

    dag

    the directed acyclic graph specifying conditional dependencies

    table

    the array of tables recording conditional probabilities

    k

    the number of classes

    cn

    the names for all classes

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def classify(z: VectorD): (Int, String)

    Given a continuous data vector 'z', classify it returning the class number (0, ..., k-1) with the highest relative posterior probability.

    Given a continuous data vector 'z', classify it returning the class number (0, ..., k-1) with the highest relative posterior probability. The vector 'z' id first converted to an integer valued vector by rounding.

    z

    the data vector to classify

    Definition Classes
    BayesNetworkClassifier
  6. def classify(z: VectorI): (Int, String)

    Given an integer-valued data vector 'z', classify it returning the class number (0, ..., k-1) with the highest relative posterior probability.

    Given an integer-valued data vector 'z', classify it returning the class number (0, ..., k-1) with the highest relative posterior probability.

    z

    the data vector to classify

    Definition Classes
    BayesNetworkClassifier
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def cp(i: Int, key: VectorI): Double

    Compute the Conditional Probability (CP) of 'x_i' given its parents' values.

    Compute the Conditional Probability (CP) of 'x_i' given its parents' values.

    i

    the ith variable (whose conditional probability is sought)

    key

    the values of x_i's parents and x_i

  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

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

    Definition Classes
    Any
  16. def jp(x: VectorI): Double

    Compute the Joint Probability (JP) of vector 'x' ('z' concat outcome).

    Compute the Joint Probability (JP) of vector 'x' ('z' concat outcome). as the product of each of its element's conditional probability.

    x

    the vector of variables

  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. def train(): Unit

    Train the classifier, i.e., ...

    Train the classifier, i.e., ...

    Definition Classes
    BayesNetworkClassifier
  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Error

Inherited from Classifier

Inherited from AnyRef

Inherited from Any

Ungrouped