jpmml/jpmml-evaluator — pull request #5 by zhangjiaqi (2014-12-06 08:01:07+00:00)
Title: Update NeuralNetworkEvaluator.java

replace (1d - Math.exp(-2d * z)) / (1d + Math.exp(-2d * z)) with Math.tanh(z);

Math.tanh() is a more robust method to calculate the tanh value. For example when z = -512, (1d - Math.exp(-2d * z)) / (1d + Math.exp(-2d * z)) will return NAN whileMath.tanh() will return -1.