Tag Archives: daily

Sharing a Birthday (56/365)

I think most have heard something like you only need suprisingly few people in a room before two people in the room end up sharing a birthday. But I never bothered to work it out. Let me do that. First, … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Response Variable (55/365)

A quick aside. I was thinking about how response variables are attached to generative models. For instance, if we want to say have binary classification on documents we would normally 1) take the dot product the topic vector with a … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

DSL for Generative Models – Interpreter (54/365)

The next step is for the library to have access to the latent variable data. I also don’t want the library to decide how to store the data because the user will have a much better idea of what is … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

DSL for Generative Models – Interpreter (53/365)

In this post, I write some functions to interpret the DSL. Specifically, I present some functions to figure out the children and parents of a node and discover what the prior, observed, and latent variables are. > import Control.Monad (msum) … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

DSL for Generative Models – Examples (52/365)

In the previous post I attempted to introduce a DSL for probabilistic models inspired by the plate notation. Let’s try to see if we can define LDA with it. > data LDALabels = Alpha | Beta | Topics | Topic … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

DSL for Generative Models (51/365)

The backlog becomes longer. I’ve changed jobs two weeks ago and it has upset my routine. No matter. Here we go again. I want to deviate from my problem solving mode for a while and use up a few posts … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Random Variables – Problem (50/365)

Moving on to the next chapter “Random Variables – I”, take a look at the following problem. Show that the random variable is continuous if and only if for all . (Forward direction) Suppose is a continuous random variable, then … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Measurable Spaces – Problem (49/365)

Let be the Lebesque-Stieltjes measure generated by a continuous function. Show that if the set is at most countable, then . A Lebesque-Stieltjes measure is a countably additive measure and is given by a generalized distribution function such that that … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Measurable Spaces – Problem (48/365)

Another question on distribution functions. Show that each of the functions is continuous on the right but is not a distribution function in . Take the first function. To show that it is continuous on the right, let and let … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Measurable Spaces – Problem (47/365)

The previous post involved distribution functions over the real numbers but it’s also possible to have distribution functions over . A problem asks to show that if we have the distribution function And a difference function Then show that Just … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment