Skip to content

Don't quite understand the polya urn model code #3

Description

@Beronx86

In the wiki, the colors of the balls in the urn are predefined and no new color is added in the procress. But in the code, new color is added to the urn under some circumstance. And the new color is sampled from G_0. However the G_0 in the code is not a distribution (not sum to 1).
When adding a new color, the code sample a new color by running unit_uniform = lambda { (rand * 100).to_i / 100.0 }. The ratio is used as the identifer of the color. What is the relationship between the ratios?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions