Consider the following two functions:

$$y_t = e^{lt} \cdot e^{st} \cdot \prod_{p=0}^{n} x_{tp}^{b_{tp}}\tag1$$

Where $e^{lt}$ captures the trend, $e^{st}$ captures the seasonality and $x_{tp}$ is our variable of interest, $0\le b_{tp}\le1$ is the exponent for our variable of interest and is time-varying as all the other variables in the equation.

Now consider this function below which is the loglog model of the previously stated multiplicative model:

$$\ln(𝑦_𝑡) = 𝑙𝑡 + 𝑠𝑡 + \sum_{p=0}^{n} \ln(x_{tp})\cdot{b_{tp}}\tag2$$

Now consider these two functions being goal-functions in an optimization problem where we want to optimize over some horizon $T$ by deciding on $x_t$-values.

In the first case both $lt$ and $st$ interacts with the decision variable $x$ but in the latter case they have zero interaction with $x$.

To put this into a context: I want to find $l_t, s_t, b_{tp}$ by regressing function (1) on historic data spanning $[(t-n)....t]$(t is our current timestep and n is the nr of datapoints available) and then forecast these coefficients over the horizon $[t....t+H]$ to be able to maximize the cumulative reward$(Y)$ of $y_t$ over the horizon. Since function 1 is not linear w.r.t parameters we log it to be able to perform OLS or such. Now we end up with function 2, lets say i perform the ols on this and retrieve $l_t, s_t, b_{tp}$, now i have to plug them back into function 1 right because keeping them in the logged form misses out on the interactions? Do anyone see any issues with the above stated algorithm?

An more extensive description of the whole problem is given at: https://stats.stackexchange.com/questions/586144/understanding-log-transformations-implications-on-optimization-problems where i more mathematically rigorously describe the whole context. This topis is probably better suited here since it focuses on the optimization part of the wider given context in the topic in the stats-forum.

What am I missing out here?


1 Answer 1


If you consider only one $t$, you can ignore the positive constant multiplier because optimizing $y_t$ is equivalent to optimizing $k_t y_t$ (or its log) for positive constant $k_t$.

But it sounds like you want to optimize $\sum_{t\in T} y_t$, in which case the log transformation does not preserve optimality because $\log$ does not commute with $\sum$.

  • $\begingroup$ first off, thanks for helping out! Precisely, i edited the question abit to put the problem into context where it can appear, the edit starts at "to put this into a context" , do you see any issues with the proposed algorithm and do you have any resources where i can read more about the problem you just stated(log does not commute with $\sum$). $\endgroup$ Commented Aug 19, 2022 at 14:29

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.