2

This is a basic level question as I have no prior experience with optimizing on shapes. I have a dataset and I am fitting a model to it. The equation of the model I want to fit is

$$R(0,\theta)=\beta_0+\beta_1 \left[ \frac{1-\exp(-\frac{\theta}{\tau_1})}{\frac{\theta}{\tau_1}} \right] + \beta_2 \left[ \frac{1-\exp(-\frac{\theta}{\tau_1})}{\frac{\theta}{\tau_1}} - \exp \left(-\frac{\theta}{\tau_1} \right) \right] + \beta_3 \left[ \frac{1-\exp(-\frac{\theta}{\tau_2})}{\frac{\theta}{\tau_2}} - \exp \left(-\frac{\theta}{\tau_2} \right) \right].$$

Here I have to model $R$ with $\theta$.

Now I want to optimize this data such that the shape of my $\theta$~$R$ graph is of almost fixed shape Something like this.

I have no idea how to proceed with this, so any help would be appreciated.

BDN
  • 624
  • you mean, you have a set $(x_i, y_i)$ and you want to simulate them by find a proper function f, such that $ y_i = f(x_i) + \epsilon_i $ and $ \epsilon_i $ small enough ? – J. Yu Jun 25 '18 at 10:07
  • I have the function f, Its the model i have given in the image, but this model can take various shapes depending on the beta parameters. For example if beta2 is positive the curvature at the maximum of the graph will be downwards and it will come down steeply after the maxima, but as you see in the graph, after maxima the function is almost constant. – Dhruv Mahajan Jun 25 '18 at 10:10
  • 1
    Why don't you explain about what are the shaping parameters and also show us a table of $(x_k,y_k)$ points ? It appears to me as being a kind of interpolation/smoothing problem. A nonlinear one. – Cesareo Jun 25 '18 at 11:00
  • Using Cesareo's notation, you have data points ${(x_k,y_k)}{k=1}^n$ and you want to choose $\beta_i, \tau_i$ to minimize $\sum{k=1}^n (y_k - R(x_k))^2$, which is also $||\vec{y} - \vec{R}||^2$. Assuming the $\tau_1, \tau_2$ parameters are fixed and you only want to choose $\beta_0, \beta_1, \beta_2, \beta_3$ the problem is easier: Writing $\vec{R} = \beta_0\vec{1} + \beta_1\vec{R}_1 + \beta_2 \vec{R}_2 + \beta_3\vec{R}_3$ then it is equivalent to finding the projection of the data vector $\vec{y}$ onto the space spanned by ${\vec{1}, \vec{R}_1, \vec{R}_2, \vec{R}_3}$. – Michael Jun 25 '18 at 13:31
  • So then you only have to do a 2-d search over gridpoints in a square of $(\tau_1, \tau_2)$ parameters, for each gridpoint $(\tau_1, \tau_2)$ you can get a simple solution to the corresponding linear regression problem to find the $\beta_i$. (Of course there may be a typo and you also have a $\tau_3$?) – Michael Jun 25 '18 at 13:37
  • Hey Micheal I already tried that approach and also I tried it without fixing tau1 and tau2 with genetic algorithms. But again my problem is that minimising the sum of least squares does not give me that shape of R-Theta curve even though it has found a global minima. It's a problem of financial significance so I care more about the shape rather than making the best fit ( Meaning I can compromise with some more error if I get the right shape) – Dhruv Mahajan Jun 25 '18 at 18:19
  • So that is why I need to modify the objective function or add penalty to the beta parameters that I cannot figure out – Dhruv Mahajan Jun 25 '18 at 18:25
  • @Cesareo Beta0 is the value of the curve at infinite values of theta. Beta0+ Beta1 is the value at very small values of theta. Beta2 is direction of the curvature at first hump(or Maxima/minima) and Beta3 is the direction of curvature at second hump. Tau1 and Tau2 are the magnitude of curvature for Beta2 and Beta3 respectively – Dhruv Mahajan Jun 25 '18 at 18:32

0 Answers0