REMINDERS

Submitting your homework

Before doing anything,

  1. Make a copy of this notebook in your clone of the private course repository. Edit that copy, not the version in the public repository clone. Please follow the instructions in the private repo README by locating your solutions on a path like phys366_2019/HW_week<N>/<Your Name(s)>/ and note that case matters.

  2. Remember that you will submit your solution by pull request to the private repository.

  3. Check again that your solutions are located on the correct path (see 1). Failing to follow these simple instructions this creates more work for the person doing the grading, with predictable results.

Submitting your project milestone

Your project milestone this week is "Data Visualization". As explained in the "Project Milestones" instructions:

By now, you should have identified what data you plan to use, obtained it, and played around a little. Prove it by submitting some kind of visualization of the data that you have generated yourselves, with a brief explanation.

As with your homework solution, push your (team's) visualization to your fork of the private repo in phys366_2019/Project_milestones/<project name>/ and submit a PR to the private repository. As above, failing to take note of the correct path will incur wrath.

Sending us feedback

Once you've submitted your solution, don't forget to also fill out the very quick (and required!) weekly feedback form.


Week 7 Homework

Fitting a cluster model another way

In the tutorial this week, you should have written the key pieces of code necessary to fit a beta model to X-ray imaging data. Presuming that is done, this assignment is a relatively simple extension.

In this case, it's probably simplest to append the questions below and your solutions to the tutorial notebook, and submit that as the homework solution. However you chose to do it, all code you've written that your solution depends on must be included in the solution somehow.

1. Explain and justify your choice of priors


In [ ]:

2. Fit the model using a new method

Obtain "best-fit" parameter values and credible regions for the model from the tutorial via Bayesian inference. Unlike previous assignments, here you are welcome and encouraged to use code packages from outside this class. The only restriction is that you must understand how the method works (at the level that we covered "advanced" methods in class), and your solution must use different fitting code than we have used before. That means

  1. Not a self-written Metropolis sampler from previous weeks. Self-written code for a more complex method is fine if that's really what you want to do, but we think it will be valuable for you to suss out the API for one of the packages that's out there.
  2. Not emcee, which you've seen in previous homeworks and tutorials.

We have an inexhaustive list of such packages in the docs for this course, but you are not limited to the codes found there.

In addition to the justification of priors above, your solution should include (most of these should feel standard by now):

  1. A brief description of how the method you've chosen works under the hood,
  2. Your (clearly commented) implementation of the inference,
  3. Trace plots and tests of convergence,
  4. A corner plot of the 1D and 2D marginalized posteriors, as well as best-fitting parameter values and 1D credible intervals,
  5. A quick visual check of the goodness of fit (e.g., the residual image corresponding to the posterior mean parameters),
  6. A few words about your experience with whatever method/package you used (how did ease of use/efficiency compare with simple Metropolis and emcee, assuming you completed the tutorial; would you recommend it for problems of this type; are there clear drawbacks or pitfalls to be aware of).

In [ ]: