Re: [SyneRBI/SIRF] stir.make_Poisson_loglikelihood seems to ignore the model parameter (#567)

5 views
Skip to first unread message

Kris Thielemans

unread,
Apr 17, 2020, 7:49:21 AM4/17/20
to SyneRBI/SIRF, Subscribed

@evgueni-ovtchinnikov can you look at this one?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Evgueni Ovtchinnikov

unread,
Apr 22, 2020, 10:51:31 AM4/22/20
to SyneRBI/SIRF, Subscribed

@KrisThielemans: So far as I can see from these two lines:

def make_Poisson_loglikelihood(acq_data, model = 'LinearModelForMean'):
...
    obj_fun = PoissonLogLikelihoodWithLinearModelForMeanAndProjData()
                                      ~~~~~~~~~~~~~~~~~~

model argument does not specify the acquisition model. My guess is, it specifies particular Poisson LogLikelihood model - cannot really say anything more useful, I am afraid, being out of my depth here.

Richard Brown

unread,
Apr 22, 2020, 11:02:54 AM4/22/20
to SyneRBI/SIRF, Subscribed

Seems there are two different meanings of model here. One being the AcquisitionModel (which is what @francescaleek expected), the other being the "model" used for the likelihood (e.g., LinearModelForMean). Model seems like a confusing name for the latter, we should maybe change it (e.g., likelihood_type).

@evgueni-ovtchinnikov perhaps an error should be thrown here?

def make_Poisson_loglikelihood(acq_data, likelihood_type = 'LinearModelForMean'):
    if likelihood_type=='LinearModelForMean':
        obj_fun = PoissonLogLikelihoodWithLinearModelForMeanAndProjData()
    else:
       raise error("unknown likelihood type, here's a list of possible entries...")

Richard Brown

unread,
Apr 22, 2020, 11:07:46 AM4/22/20
to SyneRBI/SIRF, Subscribed

For @francescaleek 's desired functionality, we would also need:

def make_Poisson_loglikelihood(acq_data, likelihood_type = 'LinearModelForMean', model=None):
    if likelihood_type=='LinearModelForMean':
        obj_fun = PoissonLogLikelihoodWithLinearModelForMeanAndProjData()
    else:
       raise error("unknown likelihood type, here's a list of possible entries...")

    if model is not None:
        obj_fun.set_acquisition_model(model)

Evgueni Ovtchinnikov

unread,
Apr 22, 2020, 11:12:57 AM4/22/20
to SyneRBI/SIRF, Subscribed

Closed #567 via 89620f9.

Kris Thielemans

unread,
Apr 22, 2020, 12:06:39 PM4/22/20
to SyneRBI/SIRF, Subscribed

Reopened #567.

Kris Thielemans

unread,
Apr 22, 2020, 12:06:40 PM4/22/20
to SyneRBI/SIRF, Subscribed

I thinl @rijobro's suggestion is very good. The intention was that we'd be able to figure out the likelihood type from the model anyway (after all, we only need to know what the domain and range are). So I even think that the likelihood_type will become irrelevant.

Kris Thielemans

unread,
Apr 24, 2020, 6:25:17 AM4/24/20
to SyneRBI/SIRF, Subscribed

let's use acq_model as parameter name

Evgueni Ovtchinnikov

unread,
Apr 27, 2020, 8:11:21 AM4/27/20
to SyneRBI/SIRF, Subscribed

Closed #567 via fd57301.

Reply all
Reply to author
Forward
0 new messages