1. A method for determining the posterior distribution of a probabilistic boosting tree, comprising: receiving input data at a graphics processing unit (GPU); determining a total posterior distribution value for the probabilistic boosting tree based on the input data using a stack implementation by: pushing one or more nodes of the probabilistic boosting tree and a corresponding weight for each of the one or more nodes onto a stack; and for each node in the stack: calculating an empirical distribution for the node using a discriminative classifier associated with that node, if the node is a leaf node, weighting the empirical distribution for the node by the corresponding weight for the node and adding the weighted empirical distribution of the node to the total posterior distribution value; if the node has sub-nodes, determining which sub-nodes are pushed onto the stack based on the empirical distribution of the node, and determining a weight for each sub-node pushed onto the stack based on the empirical distribution of the node.