Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Using the code below:

tf = open('defl_07h.csv','r')

for line in tf.readlines():
    data = [float(x) for x in line.strip().split(';') if x != '']
    indata =  tuple(data[:1])
    outdata = tuple(data[1:])
    ds.addSample(indata,outdata)

net = buildNetwork(ds.indim,20,ds.outdim,recurrent=True)
t = BackpropTrainer(net,learningrate=0.01,momentum=0.5,verbose=True)
t.trainOnDataset(ds,10)
t.testOnData(verbose=True)

Get the same outputs as follows:

out: [3.479 ] correct: [11.86 ] error: 35.12389858 out: [3.479 ] correct: [12.1 ] error: 37.16423359 out: [3.479 ] correct: [12.28 ] error: 38.73228485

then the network structure created:

Module: in
-connection to hidden0
- parameters [-1.9647867  -0.41898579 -0.24047698  0.6445537   0.06084947 -3.17343892
  0.25454776 -0.45578641  0.70865416 -0.40517853 -0.22026247 -0.13106284
 -0.71012557 -0.61140289 -0.00752148 -0.61770292 -0.50631486  0.95803659
 -1.07403163 -0.87359713]
Recurrent connections
Module: bias
-connection to out
- parameters [ 0.55130311]
-connection to hidden0
- parameters [-0.31297409 -0.2182261  -0.70730661 -1.65964456 -0.18366456  0.52280203
 -0.03388935  0.61288256  2.49908814  0.53909862 -0.56139066  0.06752532
 -0.71713239 -1.4951833   0.84217369  0.16025118  0.01176442 -0.59444178
  0.85652564  1.60607469]
Recurrent connections
Module: hidden0
-connection to out
- parameters [ 1.00559033 -0.02308752 -2.51970163  0.39714524  0.33257302 -0.6626978
 -0.53004298 -1.0141971  -0.95530079 -0.66953093 -0.00438377 -1.1945728
  0.99363152 -1.17032002  0.03620047 -0.21081934  0.2550164  -1.65894533
  0.20820361 -1.38895542]
Recurrent connections
Module: out
Recurrent connections

where could be the error?

share|improve this question
1  
Testing your code on a synthetic dataset worked with me; the outputs were different for different targets. I shall look into this further if you provide a link uploading your dataset, defl_07h.csv. –  Issam Laradji Feb 12 at 11:07
    
you can download the file on link –  Gean Kleber Feb 17 at 23:15
    
or pastebin link –  Gean Kleber Feb 17 at 23:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.