Learning Selectively Conditioned Forest Structures with Applications to DBNs and Classification