Module es.upm.fi.cig.multictbnc
Class EmptyBN
java.lang.Object
es.upm.fi.cig.multictbnc.learning.structure.constraints.AbstractStructureConstraints
es.upm.fi.cig.multictbnc.learning.structure.constraints.BN.EmptyBN
- All Implemented Interfaces:
StructureConstraints
It only allows the creation of empty BNs. This is necessary for the construction of models such as Multi-CTNBCs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialiseStructure(PGM<? extends Node> pgm) The structure of the PGM is initialised.booleanisStructureLegal(boolean[][] adjacencyMatrix, NodeIndexer<? extends Node> nodeIndexer) Determines if the structure of a PGM is legal.booleanDetermines if there is only one possible structure.
-
Constructor Details
-
EmptyBN
public EmptyBN()
-
-
Method Details
-
initialiseStructure
Description copied from interface:StructureConstraintsThe structure of the PGM is initialised. This method is necessary for models such as naive Bayes.- Specified by:
initialiseStructurein interfaceStructureConstraints- Overrides:
initialiseStructurein classAbstractStructureConstraints- Parameters:
pgm- probabilistic graphical model
-
uniqueStructure
public boolean uniqueStructure()Description copied from interface:StructureConstraintsDetermines 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:
uniqueStructurein interfaceStructureConstraints- Overrides:
uniqueStructurein classAbstractStructureConstraints- 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:StructureConstraintsDetermines if the structure of a PGM is legal.- Parameters:
adjacencyMatrix- adjacency matrixnodeIndexer- node indexer that allows access to information about the nodes- Returns:
- true if the structure is legal, false otherwise
-