Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

By default CvANN_MLP uses a CvANN_MLP::SIGMOID_SYM activation function (aka tanh). This means it expects output values to range between [-1,1] instead of [0,1]. So just transform your training output. For some weird reason CvANN_MLP does not support a standard sigmoid function, where the output range is between [0,1].

Also, you might be accessing the wrong matrix elements for the predicted value (based on the fact you got values over 1). I think it should be[0], not[i] (predout is a 1x1 matrix).