I want to create a small project, and I want to use neural networks with python. I found that pyramids are the best solution. But so far, all the examples and questions that I have found cannot help me.
I have a sequence of numbers. Hundreds of lines. Some values are missing, and instead of a number there is an "x".
for instance
1425234838636**x**40543485435097**x**43953458345345430843967067045764607457607645067045**x**04376037654067458674506704567408576405
etc. This is just an example. Not my sequence.
I thought to read the values one by one and train my neural network, and when I find the x, I will predict the number, and I will continue to train it with the following numbers.
What I have found so far is training like this
trainSet.addSample([0,0,0,0],[1])
with some inputs and some outputs.
Any tips how can I continue with it?
Edit: I understand something, and I would like to receive feedback, because I do not know if this is correct.
I still have the line above. I split it in a list, so I have a list where each object is a number.
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()
What do you think? Do you believe something like this will work?