Module es.upm.fi.cig.multictbnc
Class RandomRestartHillClimbing
java.lang.Object
es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.HillClimbing
es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.RandomRestartHillClimbing
- All Implemented Interfaces:
StructureLearningAlgorithm
Implements random-restart hill climbing.
-
Constructor Summary
ConstructorDescriptionRandomRestartHillClimbing
(HillClimbingImplementation hcImplementation, int numRestarts) Constructs aRandomRestartHillClimbing
by receiving the implementation of the hill climbing algorithm (for a Bayesian network, continuous-time Bayesian network...) and the number of restarts. -
Method Summary
Modifier and TypeMethodDescriptionboolean[][]
Performs greedy Hill climbing to find a better structure than the initial one.boolean[][]
findStructure
(int idxNode) Performs greedy Hill climbing to find a better local structure for a given node.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.Methods inherited from class es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.HillClimbing
learn, learn, learn
-
Constructor Details
-
RandomRestartHillClimbing
Constructs aRandomRestartHillClimbing
by receiving the implementation of the hill climbing algorithm (for a Bayesian network, continuous-time Bayesian network...) and the number of restarts.- Parameters:
hcImplementation
- implementation of the hill climbing algorithmnumRestarts
- number of restarts
-
-
Method Details
-
findStructure
public boolean[][] findStructure()Description copied from class:HillClimbing
Performs greedy Hill climbing to find a better structure than the initial one.- Specified by:
findStructure
in classHillClimbing
- Returns:
- found adjacency matrix
-
findStructure
public boolean[][] findStructure(int idxNode) Description copied from class:HillClimbing
Performs greedy Hill climbing to find a better local structure for a given node.- Specified by:
findStructure
in classHillClimbing
- Parameters:
idxNode
- node index- Returns:
- adjacency matrix found
-
findStructure
Description copied from class:HillClimbing
Performs greedy Hill climbing to find a better local structure for some given nodes.- Specified by:
findStructure
in classHillClimbing
- Parameters:
idxNodes
- node indexes- Returns:
- adjacency matrix found
-
getIdentifier
Description copied from interface:StructureLearningAlgorithm
Returns a unique identifier for the structure learning algorithm.- Specified by:
getIdentifier
in interfaceStructureLearningAlgorithm
- Overrides:
getIdentifier
in classHillClimbing
- Returns:
- unique identifier for the structure learning algorithm
-
getParametersAlgorithm
Description copied from interface:StructureLearningAlgorithm
Returns the parameters that are used by the algorithm.- Specified by:
getParametersAlgorithm
in interfaceStructureLearningAlgorithm
- Overrides:
getParametersAlgorithm
in classHillClimbing
- Returns:
- a
Map
with the parameters used by the algorithm
-