I have used the Delayed sin echo prediction with Tensorflow that predicts the sin wave. However, I'm not sure of the correct formula for the loss function. The problem is that I feed the training mini-batch as batch_x and batch_y, containing a combination of historical and current information. However, I provide the model with only the current information $o_{t}$ in the prediction. In my current setting, $historical \subseteq(o_{t-k+1},o_{t-k+2},\ldots,o_{t})$ where the $k$ is the size of the historical information. So, my question is how to select $y_i$ if both batch_x and batch_y use the historical and the current information.

\begin{equation*} \mathrm {MSE=}\frac {1}{n}\sum _{i=1}^{n} {({y}_{i}-\hat{y}_{i})}^{2} \end{equation*}

  • 1
    $\begingroup$ I would guess from context that this is a regression problem with some short length of sequence as input, and a single-valued output in which case yes probably the loss function is MSE. The question needs some work though. Apparently you have used some third-party code snippet in a personal experiment that you do not explain, which is the answer to some other Stack Overflow question, and you want to know the mathematical definition of loss that they are using in their code? $\endgroup$ May 3, 2022 at 10:28
  • $\begingroup$ It is unclear to me why you have put the MSE formula in the question. Are you asking if that is correct, or if it is the correct loss to use? $\endgroup$ May 3, 2022 at 10:35
  • $\begingroup$ I have updated the question. $\endgroup$ May 3, 2022 at 10:41


You must log in to answer this question.

Browse other questions tagged .