Module es.upm.fi.cig.multictbnc
Class CTBNTabuSearchIndividual
java.lang.Object
es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.implementation.CTBNHillClimbingIndividual
es.upm.fi.cig.multictbnc.learning.structure.optimisation.tabusearch.CTBNTabuSearchIndividual
- All Implemented Interfaces:
HillClimbingImplementation
Implements the tabu search algorithm for continuous-time Bayesian networks. It finds the parent set for a single
node, so it can be used to find the structure of a continuous-time Bayesian network in parallel.
-
Constructor Summary
ConstructorsConstructorDescriptionCTBNTabuSearchIndividual(CTBNScoreFunction scoreFunction, int tabuListSize, int maxNumNotImprovements) Initialises the tabu search algorithm by proving a score function and a tabu list size. -
Method Summary
Modifier and TypeMethodDescriptionprotected HillClimbingSolutionfindBestNeighbor(CTBN<? extends Node> ctbn, int idxNode, boolean[][] adjacencyMatrix, Map<Long, Double> cache) Finds the best neighbour for a CTBN node.protected boolean[][]findStructureNode(CTBN<? extends Node> ctbn, int idxNode, boolean[][] adjacencyMatrix) Optimises the function score to find the parent set of a given node.Returns a unique identifier for the hill climbing-based algorithm.Returns the parameters that are used by the hill climbing implementation.Methods inherited from class es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.implementation.CTBNHillClimbingIndividual
computeScore, findStructure, findStructure, findStructure, getInfoScoreFunction, increaseNumEdgesTested
-
Constructor Details
-
CTBNTabuSearchIndividual
public CTBNTabuSearchIndividual(CTBNScoreFunction scoreFunction, int tabuListSize, int maxNumNotImprovements) Initialises the tabu search algorithm by proving a score function and a tabu list size.- Parameters:
scoreFunction- score functiontabuListSize- tabu list sizemaxNumNotImprovements- maximum number of iterations to continue without improvements in the score before stopping the search
-
-
Method Details
-
getIdentifier
Description copied from interface:HillClimbingImplementationReturns a unique identifier for the hill climbing-based algorithm.- Specified by:
getIdentifierin interfaceHillClimbingImplementation- Overrides:
getIdentifierin classCTBNHillClimbingIndividual- Returns:
- unique identifier for the hill climbing-based algorithm
-
getParametersAlgorithm
Description copied from interface:HillClimbingImplementationReturns the parameters that are used by the hill climbing implementation.- Specified by:
getParametersAlgorithmin interfaceHillClimbingImplementation- Overrides:
getParametersAlgorithmin classCTBNHillClimbingIndividual- Returns:
- a
Mapwith the parameters used by the algorithm
-
findBestNeighbor
protected HillClimbingSolution findBestNeighbor(CTBN<? extends Node> ctbn, int idxNode, boolean[][] adjacencyMatrix, Map<Long, Double> cache) Description copied from class:CTBNHillClimbingIndividualFinds the best neighbour for a CTBN node.- Overrides:
findBestNeighborin classCTBNHillClimbingIndividual- Parameters:
ctbn- continuous-time Bayesian network that contains the nodeidxNode- node indexadjacencyMatrix- current adjacency matrixcache- cache used to avoid recomputing scores- Returns:
- a
HillClimbingSolutionwith the adjacency matrix and score of the best neighbour
-
findStructureNode
protected boolean[][] findStructureNode(CTBN<? extends Node> ctbn, int idxNode, boolean[][] adjacencyMatrix) Description copied from class:CTBNHillClimbingIndividualOptimises the function score to find the parent set of a given node.- Overrides:
findStructureNodein classCTBNHillClimbingIndividual- Parameters:
ctbn- continuous-time Bayesian network that contains the nodeidxNode- index of the nodeadjacencyMatrix- current adjacency matrix- Returns:
- adjacency matrix that includes the best parent set of the node that was found
-