15 for i,a
in availability.items() :
18 total = bioMultSum(terms)
19 nl = -Sum(log(total),iterator)
20 BIOGEME_OBJECT.STATISTICS[
'Null loglikelihood'] = nl
33 n[i] = Sum(choice == i,iterator)
35 s =
'Alt. %d chosen' % (i)
36 BIOGEME_OBJECT.STATISTICS[s] = n[i]
46 for i,a
in availability.items():
47 n[i] = Sum((a != 0),iterator)
48 for i,a
in availability.items():
49 s =
'Alt. %d available' % (i)
50 BIOGEME_OBJECT.STATISTICS[s] = n[i]
65 terms_l[i] = n[i] * log(n[i])
67 total = bioMultSum(terms_tot)
68 l = bioMultSum(terms_l)
69 l -= total * log(total)
71 BIOGEME_OBJECT.STATISTICS[
'Cte loglikelihood (only for full choice sets)'] = l
def choiceStatistics(choiceSet, choice, iterator)
Computes the number of times each alternative is chosen in the data set and ask Biogeme to include it...
def cteLoglikelihood(choiceSet, choice, iterator)
Computes the constant loglikelihood from the sample and ask Biogeme to include it in the output file...
def nullLoglikelihood(availability, iterator)
Computes the null log likelihood from the sample and ask Biogeme to include it in the output file...
def availabilityStatistics(availability, iterator)
Computes the number of times each alternative is declared available in the data set and ask Biogeme t...