I have a problem when using nnet to predict the negative values. For example
:

X = matrix(c(1,1,0,0,1,0,1,0),4,2)
X
Y = matrix(c(0,1,1,0)) - 0.5 # XOR - 0.5
Y
nn = nnet(X,Y,size=3)
val = predict(nn,X)
val # this is expected to be close to Y, but it's not !

The 'val' is always positive. I tried to change the options, but the result
isn't much better.

Could someone give me an advice ? I searched everywhere I can but nothing
found.

Thanks a lot.

-- 
Nguyen Thanh Khiem

	[[alternative HTML version deleted]]

