1. A method for constructing a tree-shaped Bayesian network from a plurality of variables associated with conditional dependencies in a given data set, the constructing being performed by a plurality of processors in parallel, the method comprising: assigning the plurality of variables as nodes to the plurality of processors; randomly selecting M variables of the plurality of variables as primary nodes, the primary nodes defining (M+1) sub trees; and operating the plurality of processors in parallel to determine a correlation for remaining nodes and to allocate each remaining node to one of the (M+1) sub-trees, wherein the assigning, the randomly selecting, and the operating are iteratively repeated for each sub-tree until all of the nodes are linked in the tree-shaped Bayesian network.