Added support for regression and binary classification to NeuralNetwork