# What would be required to make the WetGrassSprinklerRain example time sensitive

• ### Question

• Hello all!

I am going through the WetGrassSprinklerRain example right now and I am wondering what would be the correct approach to make this example sensitive to time.  What I mean by this is how could you break this up so that your probabilities were based on the occurrences of your observations happening at different times of the day.  The aggregate of those hourly probabilities would add up to what you see for the entire day, but we would also be concerned with how that spreads out over each hour.

For example.  On any given day in Florida during a summer month.  The day as a whole might have an 80% Chance of Rain, but the bulk of the observations which make up this 80% might happen between 2 and 4PM.  What would be a reasonable approach to modify this example to support providing observations based over 24 hourly periods.

• Edited by Tuesday, July 23, 2013 6:05 PM
Tuesday, July 23, 2013 6:05 PM

### All replies

• In the general case you can derive the probability variables from a Softmax regression prior (a linear model feeding into a Softmax factor). You will need to use Variational Message Passing for this.

In the case where your variables are two-value, you can use probit regression (linear model, add noise, and threshold > 0)  or logistic regression (linear model + BernoulliFromLogOdds) as a prior.

In each case the linear model can take some representation of the time of day (you may need to do some thinking as to how you featurise this depending on how much data you have).

John G.

Thursday, July 25, 2013 8:49 AM
• In the general case you can derive the probability variables from a Softmax regression prior (a linear model feeding into a Softmax factor). You will need to use Variational Message Passing for this.

In the case where your variables are two-value, you can use probit regression (linear model, add noise, and threshold > 0)  or logistic regression (linear model + BernoulliFromLogOdds) as a prior.

In each case the linear model can take some representation of the time of day (you may need to do some thinking as to how you featurise this depending on how much data you have).

John G.

Would it be possible to see an example of how to do this?  This seems like it could also be a useful example to add to the tutorial.  Specifically revolving around how one could model probabilities of event taking place over the course of a day.
Friday, July 26, 2013 6:45 PM
• I will add your request to the list of things to consider for a future release. For your particular question here, you would need to say exactly what your model is (we cannot give specific advice on modelling advice on this forum) and have a go at implementing it. We would be happy to help if you get stuck implementing it.

John G.

Wednesday, July 31, 2013 4:23 PM