Package gPy :: Module gPyC
[hide private]
[frames] | no frames]

Module gPyC

Functions implemented in C

Functions [hide private]
 
chisqprob(...)
Return the cumulative probability of a statistic according to the Chi-squared distribution.
Float
family_bdeu(...)
Return the family component of the BDeu score for a BN family from counts and prior precision.
Float
family_llh(...)
Return the family component of the marginal log-likelihood for a BN family from counts and prior parameters.
Float.
lgammadiff(...)
Return log gamma differences.
Float.
lgh(...)
Return log H.

Imports: gsl_exception


Function Details [hide private]

chisqprob(...)

 

Return the cumulative probability of a statistic according to the Chi-squared distribution.

Parameters:
  • chi2 (double) - the test statistic
  • dof (double) - the degrees of freedom of the Chi-squared distribution
Returns:
The cumulative probability (a double between zero and one, inclusive). Requires gPy to be comgsl_cdf_chisq_P(chi2, k)

family_bdeu(...)

 

Return the family component of the BDeu score for a BN family from counts and prior precision.

Called as family_bdeu(interval,ri,data,precision)

Parameters:
  • interval (int) - The distance between successive child values in data
  • ri (int) - The number of values for the child variable of the CPT
  • data (List of ints/floats) - The data for the CPT (in the standard ordering)
  • precision (Int/Float) - The prior precision.
Returns: Float
The family component of the BDeu score

family_llh(...)

 

Return the family component of the marginal log-likelihood for a BN family from counts and prior parameters.

Called as family_llh(interval,ri,data,prior)

Parameters:
  • interval (int) - The distance between successive child values in data
  • ri (int) - The number of values for the child variable of the CPT
  • data (List of ints/floats) - The data for the CPT (in the standard ordering)
  • prior (List of ints/floats) - The Dirichlet parameters. prior[i] is the Dirichlet parameter for data[i]
Returns: Float
The family component of the marginal log-likelihood

lgammadiff(...)

 

Return log gamma differences.

Called as lgammadiff(x,y)

Parameters:
  • x (Float/int) - Some number
  • y (Float/int) - Some number
Returns: Float.
lgamma(x+y) - lgamma(y)

lgh(...)

 

Return log H.

Called as lgh(counts,alpha)

Parameters:
  • counts (List) - list of counts
  • alpha (Float) - Prior precision divided by size of table
Returns: Float.
lgh function