Interface Score

All Known Subinterfaces:
DiscreteScore, HasPenaltyDiscount
All Known Implementing Classes:
BdeScore, BdeuScore, ConditionalGaussianScore, DegenerateGaussianScore, DiscreteBicScore, EbicScore, GicScores, GraphScore, ImagesScore, IndTestScore, MagSemBicScore, MnlrScore, MvpScore, PoissonPriorScore, SemBicScore, SemBicScoreDeterministic, ZsbScore

public interface Score
Interface for a score. Most methods are given defaults so that such a score will be easy to implement in Python usign JPype.
Author:
josephramsey
  • Method Summary

    Modifier and Type
    Method
    Description
    default int[]
    append(int[] parents, int extra)
    Appends an extra int to a list of ints.
    default boolean
    Returns true iff the score determines the edge between x and y.
    default int
    Returns the max degree, by default 1000.
    int
    The sample size of the data.
    default Node
    getVariable(String targetName)
    Returns the variable with the given name.
    The variables of the score.
    default boolean
    isEffectEdge(double bump)
    Returns true iff the edge between x and y is an effect edge.
    default double
    localScore(int node)
    Returns the local score of the gien node in the graph.
    default double
    localScore(int node, int parent)
    Returns the local score of the graph.
    double
    localScore(int node, int... parents)
    The score of a node given its parents.
    default double
    localScoreDiff(int x, int y)
    Returns the local score difference of the graph.
    default double
    localScoreDiff(int x, int y, int[] z)
    Returns the score difference of the graph.
    A string representation of the score.
  • Method Details

    • localScore

      double localScore(int node, int... parents)
      The score of a node given its parents.
      Parameters:
      node - The node.
      parents - The parents.
      Returns:
      The score.
    • getVariables

      List<Node> getVariables()
      The variables of the score.
      Returns:
      This list.
    • getSampleSize

      int getSampleSize()
      The sample size of the data.
      Returns:
      This size.
    • toString

      String toString()
      A string representation of the score.
      Overrides:
      toString in class Object
      Returns:
      This string.
    • localScoreDiff

      default double localScoreDiff(int x, int y, int[] z)
      Returns the score difference of the graph.
      Parameters:
      x - A node.
      y - TAhe node.
      z - A set of nodes.
      Returns:
      The score difference.
    • append

      default int[] append(int[] parents, int extra)
      Appends an extra int to a list of ints.
      Parameters:
      parents - The list of ints.
      extra - The extra int.
      Returns:
      The new list of ints.
    • localScoreDiff

      default double localScoreDiff(int x, int y)
      Returns the local score difference of the graph.
      Parameters:
      x - A node.
      y - The node.
      Returns:
      The local score difference.
    • localScore

      default double localScore(int node, int parent)
      Returns the local score of the graph.
      Parameters:
      node - A node.
      parent - A parent.
      Returns:
      The local score.
    • localScore

      default double localScore(int node)
      Returns the local score of the gien node in the graph.
      Parameters:
      node - A node.
      Returns:
      The local score.
    • getVariable

      default Node getVariable(String targetName)
      Returns the variable with the given name.
      Parameters:
      targetName - The name.
      Returns:
      The variable.
    • isEffectEdge

      default boolean isEffectEdge(double bump)
      Returns true iff the edge between x and y is an effect edge.
      Parameters:
      bump - The bump.
      Returns:
      True iff the edge between x and y is an effect edge.
    • getMaxDegree

      default int getMaxDegree()
      Returns the max degree, by default 1000.
      Returns:
      The max degree.
    • determines

      default boolean determines(List<Node> z, Node y)
      Returns true iff the score determines the edge between x and y.
      Parameters:
      z - The set of nodes.
      y - The node.
      Returns:
      True iff the score determines the edge between x and y.