6
$\begingroup$

I followed from this question.


Case1:

I have the following task to do: Training by the consecutive 3 days to predict the each 4th day. Each day data represents one CSV file which has dimension 24x25. Every datapoints of each CSV file are pixels.

Now, I need to do that, predict day4(means 4th day) by using training data day1, day2, day3(means three consecutive days), after then calculate mse between predicted day4 data and original day4 data. Let's call it mse1.

Similarly, I need to predict the day5 (means 5th day) by using training data day2, day3, day4, and then calculate the mse2(mse between predicted day5 data and original day5 data)

I need to predict day6(means 6th day)by using training data day3, day4, day5, and then calculate mse3(mse between predicted day6 data and original day6)

..........

And finally I want to Predict day93 by using training data day90, day91, day92,calculate mse90(mse between predicted day93 data and original day93)

I want to use in this case Ridge regression, Linear regression and LSTM model. And we have 90 mse for each model.

Case2:

Here I am using, is known as "the" naive forecast, or a "random walk" forecast. It is often hard to beat.

Naive approach is:

The guess for any day is simply the map of the previous day. I mean simply guess that day2 is the same as day1, guess that day3 is same as day2, guess that day4 is same as day3,....., guess that day91 is same as day90. I mean Predict next day's data using current day's data(predicted_data = current_day_data). Then calculate mse between next_day_data and current_day_data.

Results:

enter image description here

My questions:

  • In which situation would one simple regression model(in case1) outperform a naive method (in case2)? I mean, how to know specifically why one simple method outperforms another naive one on my specific dataset?

  • how to dig my data set to understand one simple method outperforms another?

My data sample for example the day1,day2,day3,day4.

$\endgroup$
3
  • $\begingroup$ Each MSE is calculated this way : we have one error (more accurately called a residual): the difference between the true and predicted values. The mean squared error(MSE) would be the mean of those squared differences, and we get one per model. $\endgroup$
    – S. M.
    Commented Nov 11 at 17:25
  • $\begingroup$ Your data is times series which violates the independent observation assumption for linear regression modeling. You need to do time series modeling for valid results. $\endgroup$ Commented Nov 12 at 12:02
  • 1
    $\begingroup$ Cross-posted at stats.stackexchange.com/q/656897/232706 and ai.stackexchange.com/q/47207/21542 $\endgroup$
    – Ben Reiniger
    Commented Nov 15 at 0:13

1 Answer 1

3
+150
$\begingroup$

This is going to depend very much on the data. Methods other than a purely naive approach (eg., last one carried forward as mentioned in the OP), should outperform the naive method for a number of reasons. Some of those are:

  • When the data exhibits a deterministic trend
  • When there are patterns in the data such as seasonality
  • When there is a dependence on covariates.

Simple regression models often do not do very well with time series data because the assumption of independent and identically distributed data is usually violated. However, there are classes of regression model such as mixed effects models that model the residual covariance matrix using, for example, AR(1), Toeplitz or fully unstructured, which could be expected to out-perform naive methods. For further reading about modelling the residual covariance matrix, this may be of some use:

Beyond AR(1) as a covariance structure for mixed models with repeated measures

Time series methods such as ARIMA would also be expected to outperform the naive methods.

More sophisticated machine-learning methods such as LSTM, as mentioned in the question, could also be considered.

$\endgroup$
7
  • $\begingroup$ Thank you Robert. Would you have any suggestions, how to dig my data to understand this exception(regression outperforms naive) ? $\endgroup$
    – S. M.
    Commented Nov 18 at 21:21
  • $\begingroup$ You're very welcome. I would suggest you focus on time series models such as ARIMA to begin with. $\endgroup$ Commented Nov 18 at 21:24
  • $\begingroup$ I already checked with ARIMA, but get same results. Regression outperforms ARIMA also. Regression outperforms naive, lstm, arima. $\endgroup$
    – S. M.
    Commented Nov 18 at 21:32
  • $\begingroup$ Can I see your model code and outputs and how you interpret them ? I'd be happy to take a look so maybe you can edit your question with the details and/or start a new thread. $\endgroup$ Commented Nov 18 at 21:39
  • 1
    $\begingroup$ here is my new question datascience.stackexchange.com/questions/130769/… $\endgroup$
    – S. M.
    Commented Nov 19 at 3:31

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.