Skip to content

Index variables in homework for week 5, exercise 3 #5

@webthusiast

Description

@webthusiast

In In[11], in the definition of mu, you use e.g. wj[W*J]. If I'm not mistaken, the index of this is 0 if either W or J is 0, and 1 if both are 1. Indexes 2 and 3 are never used. This is also reflected in Out[12] where wj[2] and wj[3] etc. are essentially equal to their priors. I guess you meant wj[2*W+J] instead.

Alternatively, I think you can use shape=(2, 2) in the definition of wj, and wj[W,J] in the definition of mu.

If I'm mistaken, please let me know. I'm only just learning this stuff.

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