1
$\begingroup$

I am building a machine learning based model (random forest in scikit-learn) to predict maize yields in the U.S. based on data on historical maize yields and temperature and precipitation information. Since there is a trend in maize yields, I detrend the yield data first, then fit the model and then predict for current year. However, I assume that the predictions from the model are detrended as well. How do I go about making predictions that are not detrended? Any pointers and literature reference would be helpful

$\endgroup$

2 Answers 2

1
$\begingroup$

If you have detrended your target (maize yields) then you should reinsert the trend to your ML predictions. E.g. For new_yield(t) = yield(t) - trend(t). If p(t) is your 'detrended' prediction then your retrended prediction is p(t) + trend(t). Check this free ebook: https://otexts.com/fpp2/decomposition.html

$\endgroup$
0
$\begingroup$

I'm just guessing but I can think of two options:

  1. Train the model from the original data, including features which represent the current trend so that the model can integrate it. It makes the job of the model more complex so it might not work very well.
  2. Since you can untrend the data I assume that you can calculate the trend function. So you could train an independent model for this trend function and apply it on the predictions obtained with the untrended model. In this case performance depend how accurately the trend is predicted.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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