The autocorrplot()
function gives the autocorrelation plot for the sampled data from the trace.
If I already have a sample of data in the form of an array or list, can I use autocorrplot()
to do the same?
Is there any alternative to generate autocorrelation plots given a sequence of data?
Please help.
Asked
Active
Viewed 165 times
0

Arjun Devdas
- 59
- 5
1 Answers
0
autocorrplot
is a wrapper around matplotlib
's acorr
. To get a similar look to pymc3
's version, you can use something like
import numpy as np
import matplotlib.pyplot as plt
my_array = np.random.normal(size=1000)
plt.acorr(my_array, detrend=plt.mlab.detrend_mean, maxlags=100)
plt.xlim(0, 100)
Note the call to xlim
at the end, since by default PyMC3
does not show negative correlations.

colcarroll
- 3,632
- 17
- 25