CodeReclaimers / neat-python

Python implementation of the NEAT neuroevolution algorithm
BSD 3-Clause "New" or "Revised" License
1.42k stars 493 forks source link

How must inputs be formatted? #151

Closed jblewdv closed 5 years ago

jblewdv commented 5 years ago

I'm curious if when using a FeedforwardNetwork the inputs have to be in a 1D array? I've attempted passing 2D arrays with no success, so I wanted to ask here to make sure. If I were to pass the following as input: x = [ [1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6], .....]

Could the net recognize their to be 3 inputs (for the 3 individual arrays) instead of 4 inputs (4 coming from the length of each array)? I'm working with time series data that has 4 values at every time step and I'd like to pass in the last 10 time steps of data as input, therefore amounting to 40 inputs. Is this possible? Thanks!

afzalmushtaque commented 5 years ago

You should probably be using a recurrent network with 4 inputs. You should pass your 10 steps of data in a loop ignoring the output until the last input where you will consider the output of the network as your final result.