weighted mse - weights as function of time

I am predicting timeseries data using LSTM (in tensorflow). Currently I am using MSE as my metric of choice.

I would like to create my own custom Weighted MSE metric, such that the weights are a decreasing function of the index, that it to put more weight on earlier time steps (earlier prediction will be better).

To elaborate on my problem definition : I am trying to predict $y_1, .. y_n$ and would like to take into account $n$. My initial approach was to define $w_1, .. w_n$ where $w_i = f(i)$. An obvious solution is to use $w_i = 1/i$ and define $WMSE = \sum w_i(y_i - \hat{y_i})^2 $.

I couldn't find any literature on the subject and would like to read on different options for $w_i = f(i)$.

Does anyone has input on the subject?

Thanks :)

Topic mse lstm tensorflow loss-function deep-learning

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.