Closed augeorge closed 1 month ago
probably can be refactored in another PR to be cleaner and more performant
added test so the shape and dimension of the returned tensor is the same as the input data - also renamed the function to 'create_pytensor_from_data_naive' since we will probably implement a faster method later
added test to check that 'll.steady_state_pytensor' runs without any errors
adds a function (plus tests) to create a pytensor from missing data .
the inputs are:
If a model variable at a particular condition was observed, then a pymc Normal distribution is created with a unique name, the observed value as the mean and the corresponding value from the input standard deviations dataframe.
If a model variable at a particular condition was not observed, then a pymc Laplace distribution is created with a unique name, and the corresponding laplace parameter values from the input laplace parameter dataframe
If a model variable at a particular condition should be excluded from calculations, then a zero pytensor is created.
The current implementation loops through each row and column and assigns the corresponding RV or zero tensor and then stacks them together.
The stacked tensor is returned at the end.
The tests cover different input data type errors, and 4 conditions: