Interface ISScore
- All Known Implementing Classes:
ISBDeuScore
,ISBicScore
public interface ISScore
Interface for a score suitable for FGES
-
Method Summary
Modifier and TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) Determines whether the given list of nodes has a specific relationship with the specified node.Retrieves the dataset used in the scoring calculations.int
Retrieves the maximum allowable degree for nodes in the current scoring context.double
Retrieves the prior probability assigned to the sample.int
Retrieves the sample size used in the score computation.double
Retrieves the prior value assigned to the structure.getVariable
(String targetName) Retrieves a variable node by its target name.Retrieves a list of variables represented as nodes.boolean
isEffectEdge
(double bump) Determines whether the edge has a significant effect based on the given bump value.double
localScore
(int node, int[] parents_is, int[] parents_pop, int[] children_population) Calculates the local score for a given node in the context of its parent nodes and children population.double
localScore1
(int node, int[] parents_is, int[] parents_pop, int[] children_pop) Calculates the local score for a given node in the context of its parent nodes and children population, without using structure prior.double
localScoreDiff
(int x, int y, int[] parentsY_is, int[] parentsY_pop, int[] childrenY_pop) Calculates the difference between local scores before and after introducing a change in the relationship between nodes x and y, considering their parent and children populations.void
setSamplePrior
(double samplePrior) Sets the prior probability value assigned to the sample.void
setStructurePrior
(double structurePrior) Sets the prior value assigned to the structure.
-
Method Details
-
localScore
double localScore(int node, int[] parents_is, int[] parents_pop, int[] children_population) Calculates the local score for a given node in the context of its parent nodes and children population.- Parameters:
node
- The index of the node for which the score is being calculated.parents_is
- An array representing the indices of the parent nodes.parents_pop
- An array representing the population of the parent nodes.children_population
- An array representing the population of the children nodes.- Returns:
- The local score for the specified node.
-
localScoreDiff
double localScoreDiff(int x, int y, int[] parentsY_is, int[] parentsY_pop, int[] childrenY_pop) Calculates the difference between local scores before and after introducing a change in the relationship between nodes x and y, considering their parent and children populations.- Parameters:
x
- The index of the node x.y
- The index of the node y.parentsY_is
- An array of indices representing the parent nodes of y.parentsY_pop
- An array of indices representing the population of parent nodes of y.childrenY_pop
- An array of indices representing the population of children nodes of y.- Returns:
- The difference in local scores due to the relationship change between x and y.
-
getVariables
-
isEffectEdge
boolean isEffectEdge(double bump) Determines whether the edge has a significant effect based on the given bump value.- Parameters:
bump
- The threshold value to evaluate the significance of the effect on the edge.- Returns:
- true if the edge has a significant effect; false otherwise.
-
getSampleSize
int getSampleSize()Retrieves the sample size used in the score computation.- Returns:
- the sample size.
-
getVariable
-
getMaxDegree
int getMaxDegree()Retrieves the maximum allowable degree for nodes in the current scoring context.- Returns:
- The maximum degree a node can have.
-
determines
Determines whether the given list of nodes has a specific relationship with the specified node.- Parameters:
z
- the list of nodes to be evaluated.y
- the node to be checked against the list.- Returns:
- true if the list of nodes determines the specified node; false otherwise.
-
localScore1
double localScore1(int node, int[] parents_is, int[] parents_pop, int[] children_pop) Calculates the local score for a given node in the context of its parent nodes and children population, without using structure prior.same as localSCire but this one doesn't use structure prior
- Parameters:
node
- The index of the node for which the score is being calculated.parents_is
- An array representing the indices of the parent nodes.parents_pop
- An array representing the population of the parent nodes.children_pop
- An array representing the population of the children nodes.- Returns:
- The local score for the specified node.
-
getStructurePrior
double getStructurePrior()Retrieves the prior value assigned to the structure.- Returns:
- the structure prior value as a double.
-
setStructurePrior
void setStructurePrior(double structurePrior) Sets the prior value assigned to the structure.- Parameters:
structurePrior
- the structure prior value to be set as a double.
-
getSamplePrior
double getSamplePrior()Retrieves the prior probability assigned to the sample.- Returns:
- the sample prior value as a double.
-
setSamplePrior
void setSamplePrior(double samplePrior) Sets the prior probability value assigned to the sample.- Parameters:
samplePrior
- the sample prior value to be set as a double.
-
getDataSet
DataSet getDataSet()Retrieves the dataset used in the scoring calculations.- Returns:
- the dataset used in the scoring calculations.
-