Added Contrastive Divergence Algorithm