Note that there are some explanatory texts on larger screens.

plurals
  1. POfill missing values of sequence with neural networks
    text
    copied!<p>I want to make a little project and I want to use neural networks with python. I found that pybrain is the best solution. But until now, all the examples and questions I have found, cannot help me.</p> <p>I have a sequence of numbers. Hundreds of rows. Some values are missing and instead of a number, there are a "x".</p> <p>For example</p> <pre><code>1425234838636**x**40543485435097**x**43953458345345430843967067045764607457607645067045**x**04376037654067458674506704567408576405 </code></pre> <p>and so on. This is just an example. Not my sequence.</p> <p>I thought to read one by one the values and train my neural net and when I find one 'x' I will predict the number and I will continue training it with the following numbers.</p> <p>What I have found until now are training like this one</p> <pre><code>trainSet.addSample([0,0,0,0],[1]) </code></pre> <p>with some inputs and some outputs.</p> <p>Any advice how can I continue with it?</p> <p><strong>Edit:</strong> I figure something and I would like to receive feedback, because I don't know if it is right.</p> <p>I still have the string for above. I split it in list so I have a list where each entity is a number.</p> <pre><code>for ind in range(len(myList)): if not myList[ind] == "x" and not myList[ind+1]=="x": ds.addSample(myList[ind],myList[ind+1]) else: break net = FeedForwardNetwork() inp = LinearLayer(1) h1 = SigmoidLayer(1) outp = LinearLayer(1) net.addOutputModule(outp) net.addInputModule(inp) net.addModule(h1) net.addConnection(FullConnection(inp, h1)) net.addConnection(FullConnection(h1, outp)) net.sortModules() trainer = BackpropTrainer(net, ds) trainer.trainOnDataset(ds,1000) trainer.testOnData(verbose=True) lis[ind+1] = net.activate((ind,)) GO to the beggining and continue from the last "x" which replaced from the net.activate() </code></pre> <p>What do you think? Do you believe that something like this will work?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload