Skip to main content
. 2017 Dec 11;17(12):2877. doi: 10.3390/s17122877
Algorithm 1. Learning algorithm for the CPT.
for∀D,// D is the input data
increment numOfData by 1;
C :=class of D;
for i=1 to n(I) do
 if C includes Ii then
     increment num(Ii) by 1;
     if ∃ q ∈ Q s.t. q ∈ C then increment num(Ii∩Q);
for i = 1 to n(I) do
 P(Ii):=num(Ii)numOfData;
       CPT(Ii):=P(Ii|Q)=P(Ii,Q)P(Q)=num(Ii∩​Q)num(Q);