I am trying to train an ANN but until now it is not learning the lower values of the training sample. I have tried using different python libraries to train ANN. The aim is to predict solar radiation from other weather parameters (regression problem). I think the ANN is confusing lower values (winter/cloudy days) with the night-time values (probably). I have tried the following but none of them worked;
- Scaling data between different values e.g. [0,1],[-1,1]
- Standardising data to have zero mean and unit variance
- Shuffling the data
- Increasing the training samples (from 3 years to 10 years)
- Using different train function (e.g. bfds, gdm)
- Trying different transfer functions (e.g. LogSig, TanSig)
- Using few input variables
- Varying hidden layers and hidden layers' neurons
Below is my code using neurolab but I have used nolearn/lasagne as well and it did not work either.
f = np.loadtxt('C:\Users\ABC.txt')
input = f[:,:8]
output = f[:,8:]
size = len(input)
output3=output
input3=input
norm_inp = nl.tool.Norm(input)
input4 = norm_inp(input)
norm_out = nl.tool.Norm(output)
output4 = norm_out(output)
net = nl.net.newff([[0, 1], [0, 1], [0, 1],[0,1],[0,1],[0,1],[0,1],[0,1]],[100, 1])
net.trainf = nl.train.train_bfgs
net.layers[0].transf= nl.trans.LogSig()
#net.layers[1].transf= nl.trans.LogSig()
error = net.train(input4, output4, epochs=1000, show=10, goal=0)
networksave = net.save('netD1.dat')
Please see below, some of the results that I have got. Any idea about what I may be doing wrong or any directions to try?