initial loglikelihhod

22 views
Skip to first unread message

Atefeh Fakourrad

unread,
Sep 25, 2021, 4:17:46 AMSep 25
to Biogeme
Dear Prof. Bierlaire,

I am estimating a logit model using PandasBioegeme. The problem is that when I run the model, the initial loglikelihood significantly changes. For instance, I just move an attribute to another alternative and there is a huge difference in initial loglikelihood. Even if I do not change anything and just run the model for the second time, the initial loglikelihood gets equal to the final loglikelihood and this affects Rho-square. Apparently, the initial likelihood is relative to the previous model while I need an absolute initial loglikelihood. Is there any way to have the absolute initial likelihood? 

Best regards,
Ati. 

Bierlaire Michel

unread,
Sep 25, 2021, 5:06:40 AMSep 25
to a.fak...@gmail.com, Bierlaire Michel, Biogeme
The initial likelihood is the likelihood for the initial values of the parameters. 
If you run several times Biogeme in the same directory, it saves previous estimates, and starts again from there, in order to save time. 

Two possibilities: 
- calculate the “null log likelihood”:  
biogeme.calculateNullLoglikelihood(av)
where av is the dictionary with the availability conditions.
It only depends on the data and the choice set.

- Disable the automatic saving of the parameters: 

biogeme.saveIterations = False

See documentation here:

Make sure also to remove any file that looks like __mymodel.iter in the working directory.


Best regards,
Ati. 


--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/681b037b-2be9-4586-8c1a-f5f9bfd419e0n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages