joshuachristie / timeseries-inference

Inferring parameters of evolutionary models from allele frequency data
0 stars 0 forks source link

alter LSTM to take in variable length time series #4

Closed joshuachristie closed 3 years ago

joshuachristie commented 3 years ago

since RNNs don't need a fixed length time series, it might be possible to get good results using the raw trajectories (i.e. not conditioning on the allele having survived for 50 or 100 generations)

actually, I can take this a step further and add a TimeDistributed Dense layer to try and predict the metric output at every timestep. This way, rather than using the entire trajectory to predict the metric, I'm using each part of the trajectory to predict the metric. Given that RNNs seem generally better suited to this problem than CNNs -- given the huge variability in length of an individual time series -- I should probably focus on developing them first.

joshuachristie commented 3 years ago

This issue is very outdated, but to resolve it---in the end, I was able to get good results without conditioning on survival. In fact, I ended up getting better results predicting on a filtered part of the dataset (e.g. those surviving 10 or more generations) after training on the unfiltered dataset than I got by training (and predicting) only on those surviving 10 or more generations. This actually surprised me but it's a nice result as I only need to train once.