Skip to content

Follow-up from "Adding dnest4 Sampler"

The following discussions from !849 (merged) should be addressed:

  • @colm.talbot started a discussion:

    Why are you using estimates of the prior widths and centres? You can get these using the .minimum and .maximum attributes of the prior classes.

  • @colm.talbot started a discussion:

    This line seems superfluous to me, why not just pass get_random_draw_from_prior to the _DNest4Model?

  • @colm.talbot started a discussion:

    These inline comments seem unnecessary

  • @colm.talbot started a discussion:

    These print statements should be removed.

  • @colm.talbot started a discussion:

    All this commented code should be removed.

  • @colm.talbot started a discussion:

    It looks like this is duplicating a bunch of code from the pymultinest implementation. We should aim to reduce this duplication.

  • @moritz.huebner started a discussion:

    Aside from FakeSampler, the other samplers are listed in alphabetical order. I know this is minor, but it would be helpful readability,

  • @moritz.huebner started a discussion:

    We don't support python 2 anymore so please don't add __future__ imports

  • @moritz.huebner started a discussion: (+2 comments)

    We usually don't use simple assert statements, because they are hard to debug for users. Could you add a helpful exception.

    For example

    if b <= a:
        raise ValueError("Some helpful information")
  • @moritz.huebner started a discussion:

    Agree with Colm here.

            for key in self.search_parameter_keys:
                width = self.priors[key].maximum - self.priors[key].minimum
                center = (self.priors[key].maximum + self.priors[key].minimum) / 2.0
                widths.append(width)
                centers.append(center)
    
  • @moritz.huebner started a discussion:

    The return is unnecessary here

Edited by Moritz Huebner