Constrained Observations

Hi,
I’m attempting to model the observations x, in pymc3 wherein if the observed x is <= 0.1 the observation can be described by x1, if 0.1 < x <= 0.9 the observation can be described by x2 and if x> 0.9 the observation can be described by x3

image

image

image

How would I construct a model of this type in pymc3?

Any help would be great!
Cheers

I’m a bit confused on your equations. Are they the expected value that you would observe if the input x is in a given range? How would your observations be distributed around said mean?

If it were just an expected value, you could write the function down using theano.tensor.switch statements to get the piecewise function intervals depending on the input.

They describe the observation x, if the observed x is in those ranges.

So it would be possible to write the likelihood using the theano.tensor.switch statements?

since x is observed, it is easier to break x into x1, x2, x3 according to the range, and then write a potential for each of them

Would this be similar to the censored data models with left and right censored data and pm.Potentials for each?

Yes.

What are these models? Would you share a link in pymc3?

Check out this notebook

1 Like

Very interesting! Thank you very much for sharing.