components_extract function

Extract conditional probabilities and clique potentials from data.