All Known Implementing Classes:
AbstractNode, CIMNode, CPTNode, DiscreteStateNode

public interface Node
Interface for a generic node of a PGM.
  • Method Details

    • areParametersEstimated

      boolean areParametersEstimated()
      Returns true if the parameters of the node were estimated.
      Returns:
      true if the parameters of the node were estimated, false otherwise
    • clearParentAndChildrenSets

      void clearParentAndChildrenSets()
      Remove the set of parents and children of the node. This method should be used with caution, as references to this node from others will not be affected. It is recommended its use when creating an empty PGM, i.e., we are removing all edges between nodes.
    • estimateLogLikelihood

      double estimateLogLikelihood()
      Returns the local log-likelihood for the node.
      Returns:
      local log-likelihood
    • getChildren

      List<Node> getChildren()
      Returns the children of the node.
      Returns:
      child node list
    • getName

      String getName()
      Returns the name of the node.
      Returns:
      node name
    • getNumParents

      int getNumParents()
      Returns the number of parents of the node.
      Returns:
      parent node list
    • getParents

      List<Node> getParents()
      Returns the parents of the node.
      Returns:
      parent node list
    • hasChildren

      boolean hasChildren()
      Specifies if the node has children.
      Returns:
      true if the node has children, false otherwise
    • hasClassVariableAsParent

      boolean hasClassVariableAsParent()
      Specifies if the node has a class variable as parent.
      Returns:
      true if the node has a class variable as parent, false otherwise
    • hasClassVariableAsSpouse

      boolean hasClassVariableAsSpouse()
      Specifies if the node has a class variable as spouse.
      Returns:
      true if the node has a class variable as spouse, false otherwise
    • hasParents

      boolean hasParents()
      Specifies if the node has parents.
      Returns:
      true if the node has parents, false otherwise
    • isClassVariable

      void isClassVariable(boolean isClassVariable)
      Defines if the node is a class variable.
      Parameters:
      isClassVariable - true if the node is a class variable, false otherwise
    • isClassVariable

      boolean isClassVariable()
      Specifies if the node is a class variable.
      Returns:
      true if the node is a class variable, false otherwise
    • isDisconnected

      boolean isDisconnected()
      Specifies if the node is disconnected, i.e., it has neither parents or children.
      Returns:
      true if the node is disconnected, false otherwise
    • isInMarkovBlanketClassVariable

      boolean isInMarkovBlanketClassVariable()
      Specifies if the node is in the Markov blanket of at least one class variable.
      Returns:
      true if the node is in the Markov blanket of a class variable, false otherwise
    • removeAllEdges

      void removeAllEdges()
      Removes the parents and children of the node.
    • removeChild

      void removeChild(Node childNode)
      Removes a certain child of the node.
      Parameters:
      childNode - child node
    • removeChildren

      void removeChildren()
      Removes the children of the node.
    • removeParent

      void removeParent(Node parentNode)
      Removes a certain parent of the node.
      Parameters:
      parentNode - parent node
    • removeParents

      void removeParents()
      Removes the parents of the node.
    • setChild

      void setChild(Node childNode)
      Defines a provided node as a child of this one.
      Parameters:
      childNode - child node
    • setParent

      void setParent(Node parentNode)
      Defines a provided node as a parent of this one.
      Parameters:
      parentNode - parent node
    • setSufficientStatistics

      void setSufficientStatistics(SufficientStatistics ss)
      Establishes the sufficient statistics of the node.
      Parameters:
      ss - sufficient statistics