Overall Goal To predict how much reagent "A" I started with in a reaction.

Data: To predict this I have timeseries data of reagent "B". For each time step a measurement of reagent "B" is taken (the amount of reagent "B" present at that time point). The overall timeseries is a curve. This curve may change based on how much reagent "A" I start with.

My question is what model should I use to predict reagent A? Will a Recurrent NN work? I have only seen RNN used in predicting the very next time steps or to classify something based on the timeseries. I am looking for the model to use time series data to predict a regression problem.



If you have measured Reagent B for same number of time steps for each experiment, then:

  1. Using these time steps as feature values, you can build a regression model using, Multi Layer Perceptions, XGBoost/LGBM/RandomForests etc.
  2. Even Recurrent Neural Nets could work if enough data is available. Treat your time step values of Reagent B as single dimention embedding values and use BiLSTM architecture with Linear activation function in the last layer. Loss could be mean squared error. BiLSTM could work in your case as it makes sense to read from last time step to first time step also

If reagent B is measured for different time steps, in different experiments:

  1. You can still use Ensemble Trees/MLP/RNN based methods, but you will have to consider adding paddings(imputing) or limiting max time steps to make number of time steps uniform across all experiments.

XGB/LGBM can take missing values as inputs and handle it well, so you dont need to do any imputation.

  • $\begingroup$ Thankyou for your post. Boosted Random Forests work fairly well though it is overfitting on the training data. I have never used lag variables so I looked them up. From what I read they predict future steps. Is this correct? I need to predict a starting amount. $\endgroup$ – Dave Mar 24 '20 at 15:05
  • $\begingroup$ Ok, Apologies. I had mis-understood it. This makes it look like RNNs could work. You would Ideally want to do what we do in text classification except the final layer would be dense with linear activation function(instead of softmax/sigmoid). Your input will be one dimensional value of reagent B(how many ever time steps it may have) as if it were an embedding of dimention 1. $\endgroup$ – Narahari B M Mar 25 '20 at 15:19
  • $\begingroup$ I have updated the answer $\endgroup$ – Narahari B M Mar 25 '20 at 15:36
  • $\begingroup$ Have you tried regularizing your GBMs? You can reduce overfitting by tuning parameters like max depth, gamma, alpha, lambda (xgboost.readthedocs.io/en/latest/parameter.html). I usually play with maxdepth, lambda and gamma $\endgroup$ – Narahari B M Mar 25 '20 at 15:42
  • $\begingroup$ I was able to reduce overfitting for BRF by re-structuring my datasets. I will try using the other models and embedded RNN with the layers suggested to see if I get better results. Thanks again! - Dave $\endgroup$ – Dave Mar 25 '20 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.