Package edu.cmu.tetrad.search.score
Class PoissonPriorScore
java.lang.Object
edu.cmu.tetrad.search.score.PoissonPriorScore
- All Implemented Interfaces:
Score
Implements Poisson prior score, a novel (unpubished) score that replaces the penalty term in BIC by the log of the Poisson distribution. The Poisson distribution has a lambda parameter, which is made a parameter of this score and acts like a structure prior for the score.
Here is the Wikipedia page for the Poisson distribution, for reference:
https://en.wikipedia.org/wiki/Poisson_distribution
As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.
- Author:
- bryanandrews, josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionPoissonPriorScore
(DataSet dataSet, boolean precomputeCovariances) Constructs the score using a covariance matrix.PoissonPriorScore
(ICovarianceMatrix covariances) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) getData()
int
int
The sample size of the data.The variables of the score.boolean
isEffectEdge
(double bump) double
localScore
(int i, int... parents) The score of a node given its parents.double
localScoreDiff
(int x, int y, int[] z) void
setLambda
(double lambda) void
setVerbose
(boolean verbose) Methods inherited from class java.lang.Object
clone, equals, finalize, 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
-
PoissonPriorScore
Constructs the score using a covariance matrix. -
PoissonPriorScore
Constructs the score using a covariance matrix.
-
-
Method Details
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) - Specified by:
localScoreDiff
in interfaceScore
-
localScore
Description copied from interface:Score
The score of a node given its parents.- Specified by:
localScore
in interfaceScore
- Parameters:
i
- The index of the node.parents
- The indices of the node's parents.- Returns:
- The score, or NaN if the score cannot be calculated.
- Throws:
RuntimeException
-
getCovariances
-
getSampleSize
public int getSampleSize()Description copied from interface:Score
The sample size of the data.- Specified by:
getSampleSize
in interfaceScore
- Returns:
- This size.
-
isEffectEdge
public boolean isEffectEdge(double bump) - Specified by:
isEffectEdge
in interfaceScore
-
setVerbose
public void setVerbose(boolean verbose) -
getVariables
Description copied from interface:Score
The variables of the score.- Specified by:
getVariables
in interfaceScore
- Returns:
- This list.
-
getMaxDegree
public int getMaxDegree()- Specified by:
getMaxDegree
in interfaceScore
-
determines
- Specified by:
determines
in interfaceScore
-
getData
-
setLambda
public void setLambda(double lambda)
-