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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialiseStructure
(PGM<? extends Node> pgm) The structure of the PGM is initialised.boolean
isStructureLegal
(boolean[][] adjacencyMatrix, NodeIndexer<? extends Node> nodeIndexer) Determines if the structure of a PGM is legal.boolean
Determines if there is only one possible structure.
-
Constructor Details
-
EmptyBN
public EmptyBN()
-
-
Method Details
-
initialiseStructure
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 interfaceStructureConstraints
- Overrides:
initialiseStructure
in classAbstractStructureConstraints
- 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 interfaceStructureConstraints
- Overrides:
uniqueStructure
in 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:StructureConstraints
Determines 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
-