BUG: Added function to set neural network use of sparse cost function.