I try to predict multiple independent time series simultaneously using sklearn linear regression model, but I seem not be able to get it right.
My data is organised
If you need to build separate models, there is no possibility to use the power of numpy for getting performance improvement of the fact you have many different tasks. The only thing you can do is to run them simultaneously in different threads (by using multi cores of you CPU) or even split calculations to different computers.
If you believe all the data fit the same model, then the obvious solution is just to merge all the Xn
and yn
and learn on them. This will definitely be faster then calculating separate models.
But in fact the question is not in the calculations performance but in the result you want to get. If you need different models you have no options, just calculate them separately. If you need one model, just merge the data. Otherwise, if you would calculate separate models you'll get the problem: how to get the final parameters from all that models.