Estimating Causal Power

Following the examples in Probabilistic Models of Cognition on estimating causal power (chapter 8):

A common problem for cognition is causal learning: from observed evidence about the co-occurance of events, attempt to infer the causal structure relating them. An especially simple case that has been studied by psychologists is elemental causal induction: causal learning when there are only two events, a potential cause C and a potential effect E. Cheng and colleagues [@Cheng] have suggested assuming that C and background effects can both cause C, with a noisy-or interaction. Causal learning then because an example of parameter learning, where the parameter is the “causal power” of C to cause E:
%% causal power of C to cause E (prior) P::cpw(0) ; P::cpw(0.25) ; P::cpw(0.5) ; P::cpw(0.75) ; P::cpw(1.0) :- P is 1.0/5. %% background probability of E (prior) P::bw(0) ; P::bw(0.25) ; P::bw(0.5) ; P::bw(0.75) ; P::bw(1.0) :- P is 1.0/5. %P::cp(T) :- cpw(P). %P::b(T) :- bw(P). %e_if_c(C,T) :- cp(T), C=true. %e_if_c(C,T) :- b(T). P::e_if_c(C,T) :- cpw(P), C=true. P::e_if_c(C,T) :- bw(P). evidence(e_if_c(true,0), true). evidence(e_if_c(true,1), true). evidence(e_if_c(false,2), false). evidence(e_if_c(true,3), true). query(cpw(V)).

Since ProbLog can be interpreted as causal rules (cfr. CP-logic semantics), this can also be expressed using this causal direction. This will simplify the model:

%% causal power of C to cause E (prior) P::cpw(0) ; P::cpw(0.25) ; P::cpw(0.5) ; P::cpw(0.75) ; P::cpw(1.0) :- P is 1.0/5. %% background probability of E (prior) P::bw(0) ; P::bw(0.25) ; P::bw(0.5) ; P::bw(0.75) ; P::bw(1.0) :- P is 1.0/5. 0.5::c(T). % Prior on c. Will not be important because fully observed. P::e(T) :- cpw(P), c(T). P::e(T) :- bw(P). evidence(c(0), true). evidence(e(0), true). evidence(e(1), true). evidence(c(1), true). evidence(e(2), false). evidence(c(2), false). evidence(e(3), true). evidence(c(3), true). query(cpw(V)).