Added switch between logistic and rand forest.