java.lang.Object
es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.HillClimbing
All Implemented Interfaces:
StructureLearningAlgorithm
Direct Known Subclasses:
FirstChoiceHillClimbing, RandomRestartHillClimbing

public abstract class HillClimbing extends Object implements StructureLearningAlgorithm
Implements common attributes and methods for hill climbing algorithms.
  • 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

      public abstract boolean[][] findStructure(List<Integer> idxNodes)
      Performs greedy Hill climbing to find a better local structure for some given nodes.
      Parameters:
      idxNodes - node indexes
      Returns:
      adjacency matrix found
    • getIdentifier

      public String getIdentifier()
      Description copied from interface: StructureLearningAlgorithm
      Returns a unique identifier for the structure learning algorithm.
      Specified by:
      getIdentifier in interface StructureLearningAlgorithm
      Returns:
      unique identifier for the structure learning algorithm
    • getParametersAlgorithm

      public Map<String,String> getParametersAlgorithm()
      Description copied from interface: StructureLearningAlgorithm
      Returns the parameters that are used by the algorithm.
      Specified by:
      getParametersAlgorithm in interface StructureLearningAlgorithm
      Returns:
      a Map with the parameters used by the algorithm
    • learn

      public void learn(PGM<? extends Node> pgm, List<Integer> idxNodes)
      Description copied from interface: StructureLearningAlgorithm
      Learns the local structure of certain nodes of a PGM.
      Specified by:
      learn in interface StructureLearningAlgorithm
      Parameters:
      pgm - a probabilistic graphical model
      idxNodes - node indexes
    • learn

      public void learn(PGM<? extends Node> pgm)
      Description copied from interface: StructureLearningAlgorithm
      Learns the structure of a certain PGM.
      Specified by:
      learn in interface StructureLearningAlgorithm
      Parameters:
      pgm - a probabilistic graphical model
    • learn

      public void learn(PGM<? extends Node> pgm, int idxNode)
      Description copied from interface: StructureLearningAlgorithm
      Learn the local structure of a certain node of a PGM.
      Specified by:
      learn in interface StructureLearningAlgorithm
      Parameters:
      pgm - a probabilistic graphical model
      idxNode - node index