Module es.upm.fi.cig.multictbnc
Class HillClimbing
java.lang.Object
es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.HillClimbing
- All Implemented Interfaces:
StructureLearningAlgorithm
- Direct Known Subclasses:
FirstChoiceHillClimbing,RandomRestartHillClimbing
Implements common attributes and methods for hill climbing algorithms.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean[][]Performs greedy Hill climbing to find a better structure than the initial one.abstract boolean[][]findStructure(int idxNode) Performs greedy Hill climbing to find a better local structure for a given node.abstract boolean[][]findStructure(List<Integer> idxNodes) Performs greedy Hill climbing to find a better local structure for some given nodes.Returns a unique identifier for the structure learning algorithm.Returns the parameters that are used by the algorithm.voidLearns the structure of a certain PGM.voidLearn the local structure of a certain node of a PGM.voidLearns the local structure of certain nodes of a PGM.
-
Constructor Details
-
HillClimbing
public HillClimbing()
-
-
Method Details
-
findStructure
public abstract boolean[][] findStructure()Performs greedy Hill climbing to find a better structure than the initial one.- Returns:
- found adjacency matrix
-
findStructure
public abstract boolean[][] findStructure(int idxNode) Performs greedy Hill climbing to find a better local structure for a given node.- Parameters:
idxNode- node index- Returns:
- adjacency matrix found
-
findStructure
Performs greedy Hill climbing to find a better local structure for some given nodes.- Parameters:
idxNodes- node indexes- Returns:
- adjacency matrix found
-
getIdentifier
Description copied from interface:StructureLearningAlgorithmReturns a unique identifier for the structure learning algorithm.- Specified by:
getIdentifierin interfaceStructureLearningAlgorithm- Returns:
- unique identifier for the structure learning algorithm
-
getParametersAlgorithm
Description copied from interface:StructureLearningAlgorithmReturns the parameters that are used by the algorithm.- Specified by:
getParametersAlgorithmin interfaceStructureLearningAlgorithm- Returns:
- a
Mapwith the parameters used by the algorithm
-
learn
Description copied from interface:StructureLearningAlgorithmLearns the local structure of certain nodes of a PGM.- Specified by:
learnin interfaceStructureLearningAlgorithm- Parameters:
pgm- a probabilistic graphical modelidxNodes- node indexes
-
learn
Description copied from interface:StructureLearningAlgorithmLearns the structure of a certain PGM.- Specified by:
learnin interfaceStructureLearningAlgorithm- Parameters:
pgm- a probabilistic graphical model
-
learn
Description copied from interface:StructureLearningAlgorithmLearn the local structure of a certain node of a PGM.- Specified by:
learnin interfaceStructureLearningAlgorithm- Parameters:
pgm- a probabilistic graphical modelidxNode- node index
-