View full-text article in PMC Sensors (Basel). 2017 Dec 11;17(12):2877. doi: 10.3390/s17122877 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). PMC Copyright notice 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);