Monte Carlo example issues

Open
#88 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
jupyter-notebook, python

Research direction

Start with the Monte Carlo example and the named entry points: MonteCarlo::random_agent(), energy(), accept_change(), and the listed test functions. Read the related issue 86 and inspect the notebook cell containing %%cmd; done means the questions, typo, mock behavior, assertions, and notebook error have an agreed explanation or correction.

Written by the indexing model from the issue text.

Description

2018-19
  1. what do we mean by density?

  2. In MonteCarlo::random_agent(), what does enumerate() do?

  3. In energy(), what is the coefficient for? It doesn't seem to be Beta, the coefficient mentioned above.

  4. In accept_change(), how do we know that we should implement the following line?
    return exp(-(successor - prior) / self.temperature) > uniform()

  5. What does this do?
    import sys
    sys.path.append('DiffusionExample')

  6. In def test_move_particle_one_over():
    "change" should be "changed"

  7. In same function, what does multiply.reduce do?

  8. In def test_equal_probability():
    energy = MagicMock()
    But in def test_accept_change():
    energy = MagicMock
    Do the missing brackets matter?

  9. In def test_equal_probability():
    It looks like changes_at_zero is a list of booleans.
    I'm not sure what the next line is doing or how:
    assert count_nonzero(changes_at_zero),etc.

  10. In def test_accept_change():
    please explain the final assertion.

NB Maybe some of this code isn't essential to be understood line-by-line??

  1. In def test_main_algorithm(): I don't really understand what the Mocks are doing with their side effects
    This relates to issue 86

  2. Error at end of page - UsageError: Cell magic %%cmd not found. - presumably it should be %%bash, although if we're not going to be using notebooks I guess this error doesn't matter

Dominant language
Python
Stars
133
Forks
111
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UCL/rsd-engineeringcourse

All issues in UCL/rsd-engineeringcourse

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.