Class MagDgBicScore
java.lang.Object
edu.cmu.tetrad.search.work_in_progress.MagDgBicScore
- All Implemented Interfaces:
Score
Gives a BIC score for a linear, Gaussian MAG (Mixed Ancestral Graph). It will perform the same as SemBicScore for
DAGs.
As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.
- Version:
- $Id: $Id
- Author:
- Bryan Andrews
-
Constructor Summary
ConstructorsConstructorDescriptionMagDgBicScore
(DataSet dataSet) Constructor.MagDgBicScore
(DataSet dataSet, boolean precomputeCovariances) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetMag()
Returns the wrapped MAG.int
Returns the max degree, by default 1000.getOrder()
Returns the order.double
getPenaltyDiscount.int
The sample size of the data.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... js) The score of a node given its parents.double
localScoreDiff
(int x, int y, int[] z) Returns the score difference of the graph.void
resetMag()
Sets the MAG to null.void
Sets the order ot null.void
Sets the MAG to wrap.void
Sets the order.void
setPenaltyDiscount
(double penaltyDiscount) Seets the penalty discount.toString()
toString.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.search.score.Score
append, determines, getVariable, localScore, localScore, localScoreDiff
-
Constructor Details
-
MagDgBicScore
Constructor.- Parameters:
dataSet
- The covarainces to analyze.
-
MagDgBicScore
Constructor.- Parameters:
dataSet
- The continuous dataset to analyze.precomputeCovariances
- a boolean
-
-
Method Details
-
getMag
-
setMag
-
resetMag
public void resetMag()Sets the MAG to null. -
getOrder
-
setOrder
-
resetOrder
public void resetOrder()Sets the order ot null. -
localScore
public double localScore(int i, int... js) The score of a node given its parents.Return the BIC score for a node given its parents.
- Specified by:
localScore
in interfaceScore
- Parameters:
i
- The node.js
- The parents.- Returns:
- The score.
-
getPenaltyDiscount
public double getPenaltyDiscount()getPenaltyDiscount.
- Returns:
- The penalty discount, a multiplier on the penalty term of BIC.
-
setPenaltyDiscount
public void setPenaltyDiscount(double penaltyDiscount) Seets the penalty discount.- Parameters:
penaltyDiscount
- This number, a multiplier on the penalty term of BIC.
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.- Specified by:
localScoreDiff
in interfaceScore
- Parameters:
x
- A node.y
- TAhe node.z
- A set of nodes.- Returns:
- The score difference.
-
getSampleSize
public int getSampleSize()The sample size of the data.Returns the sample size.
- Specified by:
getSampleSize
in interfaceScore
- Returns:
- This size.
-
getVariables
The variables of the score.Returns the list of variables.
- Specified by:
getVariables
in interfaceScore
- Returns:
- This list.
-
isEffectEdge
public boolean isEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.Returns a judgment for FGES as to whether an edges with this bump (for this score) counts as an 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:
-
getMaxDegree
public int getMaxDegree()Returns the max degree, by default 1000.Returns a judgment of the max degree needed for this score.
- Specified by:
getMaxDegree
in interfaceScore
- Returns:
- The max degree.
- See Also:
-
toString
-