2
$\begingroup$

Three decay solid lines are plotted in the graph below. They are sqrt(1/n), sqrt(log(log(n))/n) and sqrt(log(n)/n) respectively.

I plot my dataset on the graph as the hdi dashed line. How to determine which decay line the hdi dashed line is closest to? In fact, for every decay line, I can multiply the hdi line by a constant to make it look very close to it. My question basically is: how to determine the decay rate for a given line?

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ I'd suggest you try log-log scaling on your plot; it should make it easier to see detail. Multiplication by a constant would be converted to a shift so you're just be looking for parallel curves. $\endgroup$
    – Glen_b
    Nov 7, 2019 at 0:23

1 Answer 1

1
$\begingroup$

As advised in the comments (+1), since y-values are very small, you can't observe the asymptotical behaviors of the curves with this scale (at least clearly). Just add plt.yscale('log') to your plotting lines. It seems you're using Python matplotlib. Below is an example:

import numpy as np
import matplotlib.pyplot as plt

plt.figure(figsize = (18,6))
n = np.arange(2,40000)

plt.plot(n, np.sqrt(1/n), color = 'orange')
plt.plot(n, np.sqrt(np.log(np.log(n))/n), color = 'green')
plt.plot(n, np.sqrt(np.log(n)/n), color = 'red')

plt.yscale('log')
plt.show()

which has the following output: enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.