java.lang.Object
es.upm.fi.cig.multictbnc.learning.structure.constraints.AbstractStructureConstraints
es.upm.fi.cig.multictbnc.learning.structure.constraints.CTBNC.NaiveBayes
All Implemented Interfaces:
StructureConstraints

public class NaiveBayes extends AbstractStructureConstraints
Defines the structure of a continuous-time Naive Bayes classifier. As it is used for the construction of Multi-CTBNCs, the existence of more than one class variable is allowed.
  • Constructor Details

    • NaiveBayes

      public NaiveBayes()
  • Method Details

    • initialiseStructure

      public void initialiseStructure(PGM<? extends Node> pgm)
      Description copied from interface: StructureConstraints
      The structure of the PGM is initialised. This method is necessary for models such as naive Bayes.
      Specified by:
      initialiseStructure in interface StructureConstraints
      Overrides:
      initialiseStructure in class AbstractStructureConstraints
      Parameters:
      pgm - probabilistic graphical model
    • uniqueStructure

      public boolean uniqueStructure()
      Description copied from interface: StructureConstraints
      Determines if there is only one possible structure. This is the case of models such as naive Bayes, for which it is not necessary to find a structure.
      Specified by:
      uniqueStructure in interface StructureConstraints
      Overrides:
      uniqueStructure in class AbstractStructureConstraints
      Returns:
      true if there is only one possible structure, false otherwise
    • isStructureLegal

      public boolean isStructureLegal(boolean[][] adjacencyMatrix, NodeIndexer<? extends Node> nodeIndexer)
      Description copied from interface: StructureConstraints
      Determines if the structure of a PGM is legal.
      Parameters:
      adjacencyMatrix - adjacency matrix
      nodeIndexer - node indexer that allows access to information about the nodes
      Returns:
      true if the structure is legal, false otherwise