BICScore#
- class causalbase.scores.BICScore(data, *, penalty_discount=1.0, expected_parents=1.0, n_jobs=1)[source]#
BIC local score over a discrete dataset, memoised per family.
The maximised log likelihood of a family less
penalty_discount * log(n) / 2per free parameter,q * (r - 1)for a child ofrlevels whose parents takeqjoint configurations, plus the structure prior ofFamilyScore.- Parameters:
- dataDiscreteDataset
The data to score against.
- penalty_discountfloat, default=1.0
Multiplies the penalty; larger values give sparser structures.
- expected_parentsfloat or None, default=1.0
Expected number of parents per node under the structure prior, as in
BDeuScore.Noneis the plain BIC.- n_jobsint, default=1
Threads of the compiled kernels for large batches of candidate parents and for the exact search; -1 is every thread numba has. Results do not depend on it.
Notes
Not safe to share between threads, for the reasons given in
BDeuScore.