Class BCCausalInference
java.lang.Object
edu.pitt.dbmi.algo.bayesian.constraint.inference.BCCausalInference
This is a thread-safe version of BCInference.
Jan 30, 2019 5:42:50 PM
- Version:
- $Id: $Id
- Author:
- Kevin V. Bui (kvb2@pitt.edu)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
An enum for the type of operation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
probConstraint
(BCCausalInference.OP constraint, int x, int y, int[] z) This function takes a constraint, which has a value of either OP.dependent or OP.independent, of the form "X independent Y given Z" or "X dependent Y given Z" and returns a probability for that constraint given the data in cases and assumed prior probability for that constraint given the data in cases and assumed prior probabilities.
-
Constructor Details
-
BCCausalInference
public BCCausalInference(int[] nodeDimension, int[][] cases) Constructor- Parameters:
nodeDimension
- nodeDimension[0] is the number of nodes, nodeDimension[1] is the number of cases, and the rest are the dimensions of the nodes.cases
- cases[0] is the number of cases, and the rest are the cases.
-
-
Method Details
-
probConstraint
This function takes a constraint, which has a value of either OP.dependent or OP.independent, of the form "X independent Y given Z" or "X dependent Y given Z" and returns a probability for that constraint given the data in cases and assumed prior probability for that constraint given the data in cases and assumed prior probabilities. Currently, it assumes uniform parameter priors and a structure prior of 0.5. A structure prior of 0.5 means taht a priori we have that P(X independent Y given Z) = P(X dependent Y given Z) = 0.5.Z[0] is the length of the set represented by array Z. For an example, Z[0] = 1 represents the set Z of size 1. Z[0] = 0 represents an empty set.
Set Z with two elements: Z = {3, 2} Z[0] = 2 // set Z has two elements (length of 2) Z[1] = 3 // first element Z[2] = 2 // second element.
Empty set: Z = {} Z[0] = 0
- Parameters:
constraint
- has the value OP.independent or OP.dependentx
- node xy
- node yz
- set of nodes- Returns:
- P(x dependent y given z | data) or P(x independent y given z | data)
-