Package edu.cmu.tetrad.search.score
Class MvpScore
java.lang.Object
edu.cmu.tetrad.search.score.MvpScore
- All Implemented Interfaces:
Score
Implements a mixed variable polynomial BIC score. The reference is here:
Andrews, B., Ramsey, J., & Cooper, G. F. (2018). Scoring Bayesian networks of mixed variables. International journal of data science and analytics, 6, 3-18.
- Version:
- $Id: $Id
- Author:
- Bryan Andrews
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) Returns true iff the score determines the edge between x and y.int
Returns the max degree, by default 1000.int
Returns the sample size.The variables of the score.boolean
isEffectEdge
(double bump) Returns true iff the edge between x and y is an effect edge.double
localScore
(int i, int... parents) The local score of the child given its parents.double
localScoreDiff
(int x, int y, int[] z) Returns localScore(y | z, x) - localScore(y | z).Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.search.score.Score
append, getVariable, localScore, localScore, localScoreDiff, toString
-
Constructor Details
-
MvpScore
Constructor.- Parameters:
dataSet
- The mixed dataset being analyzed.structurePrior
- The structure priorfDegree
- The f degree.discretize
- a boolean
-
-
Method Details
-
localScore
public double localScore(int i, int... parents) The local score of the child given its parents.- Specified by:
localScore
in interfaceScore
- Parameters:
i
- The child.parents
- The parents.- Returns:
- The local score.
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) Returns localScore(y | z, x) - localScore(y | z).- Specified by:
localScoreDiff
in interfaceScore
- Parameters:
x
- A node.y
- The node.z
- A set of nodes.- Returns:
- The score difference.
-
getSampleSize
public int getSampleSize()Returns the sample size.- Specified by:
getSampleSize
in interfaceScore
- Returns:
- This size.
-
isEffectEdge
public boolean isEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.A method for FGES returning a judgment of whether an edge with a given bump counts as a effect edge.
- Specified by:
isEffectEdge
in interfaceScore
- Parameters:
bump
- The bump.- Returns:
- True iff the edge between x and y is an effect edge.
- See Also:
-
getVariables
The variables of the score.Returns the list of variables.
- Specified by:
getVariables
in interfaceScore
- Returns:
- This list.
-
getMaxDegree
public int getMaxDegree()Returns the max degree, by default 1000.Returns an estimate of the maximum degree of the graph for some algorithms.
- Specified by:
getMaxDegree
in interfaceScore
- Returns:
- The max degree.
-
determines
Returns true iff the score determines the edge between x and y.Returns a judgment of whether the variable in z determine y exactly.
- Specified by:
determines
in interfaceScore
- Parameters:
z
- The set of nodes.y
- The node.- Returns:
- True iff the score determines the edge between x and y.
-