RJT1990 / pyflux

Open source time series library for Python
BSD 3-Clause "New" or "Revised" License
2.1k stars 240 forks source link

Singular Matrix error when fitting Metropolis Hastings #91

Open pranavbahl2308 opened 7 years ago

pranavbahl2308 commented 7 years ago

I am getting error: "numpy.linalg.linalg.LinAlgError: singular matrix" fitting Metropolis Hastings in Arima for following data:

data = [877.24 242.37 632.68 0. 790.85 1044.57 410.63 724.53 712.15 881.43 2429.85 510.77 1167.47 684.73 449.4 150.76 173.34 0. 0. 180.31 1767.4 0. 252.6 158.17 760.84 819.46 84.2 267.77 1273.1 1239.23 1190.13 1202.42 2263.76 765.47 822.65 797.51 1593.4 1200.12 1841.99 1653.43 928.94 2642.19 1508.9 826.05 677.57 824.89 1192.6 2041.22 1186.56 1629.41 565.66 2392.03 2310.8 1716.83 2545.34 752.66 1766.62 2679.01 719.4 1115.65 1319.93 1437.22 2890.18 1213.99 1272.96 2573.03 2707.53 1998.8 684.91 239.03 0. 253.78 376.15 1236.12 580.18 1412.28 1278.7 1682.25 1370.4 769.19 2016.28 1199.7 1176.21 796.92 1092.77 835.05 1929.38 2022.34 2076.59 783.25 2424.03 2068.8 741.09 1436.67 2353.58 1183.16 1292.87 1115.97 3195.02 1763.97 1514.37 2565.78 2125.06 2292.]

code: import pyflux as pf

model = pf.ARIMA(data,ar=1,integ=0,ma=1)

But if I change the ma value for same model to 0 it runs perfectly.