I’m new to PYMC3 and I am a bit stuck trying to fit some data with the ODE package.
I’d like to develop a complex model with some time-varying parameters, and to test my understanding, I developed a simple test case to try and infer a toy rockets fuel ‘burn’ as a function of time, to match some data of it’s velocity. I created this using the first example here as a guide.
The basic prescription: 1) First, I import the data, which is a 2 state vector of rocket velocity and 1d position into a numpy array 'rocket_data' 2) Then I define a process model that could be passed to scipy.integrate.odeint 3) Define the DifferentialEquation that will be passed to pymc 4) Define the PYMC model In this case, when I pass a time series distribution ex. GaussianRandomWalk to one of the parameters of the model, I get an error: AsTensorError: ('Cannot convert [6.8, 20, delta_m] to TensorType', <class 'list'>) Can anyone advise on how to allow this model to infer a new delta_m at each data point? I understand this seems like a trivial problem here, but my end application will be more hierarchical in nature.
Thanks (29.3 KB) rockettalk.py (2.2 KB)