AttributeError: 'list' object has no attribute 'items'

34 zobrazení
Preskočiť na prvú neprečítanú správu

linlin zhang

neprečítané,
26. 8. 2022, 9:21:0326. 8. 2022
komu: Biogeme
Dear Prof Michel,

I am using the CNL model, and the independent variables are all related to the personal characteristics, has nothing to do with the modes. When I run

>  logprob = models.cnl_avail(V, av, nests, HHType)
There is an error:   File ~\Anaconda3\lib\site-packages\biogeme\models.py:1654 in checkValidityCNL
    for i, a in alpha.items():
AttributeError: 'list' object has no attribute 'items'

How can I solve it?

Many thanks!

Best, Lin

Bierlaire Michel

neprečítané,
27. 8. 2022, 6:24:0227. 8. 2022
komu: linlin...@gmail.com, Bierlaire Michel, Biogeme
First, cnl_avail returns the probability. If you need the log, use logcnl_avail.

The error probably comes from an error in the specification of the nests. Have a look at the examples online to check the syntax. 

--
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/677883e4-a913-4d1e-8f4f-391fc3cb9c7en%40googlegroups.com.

linlin zhang

neprečítané,
27. 8. 2022, 12:26:1227. 8. 2022
komu: Biogeme
Dear Michel,

I tried to build up the NL model step by step, and successed. However, I am not trying CNL model, and have not gotten the outcome yet after more than 24 hours. I have 120,000 oberservation, and have 24 independent varaibles related to the personal characteristics. Thus, I have no idea if there is no outcome actually or just it needs more time. What should I do for this? 

Best, Lin

linlin zhang

neprečítané,
27. 8. 2022, 12:26:2727. 8. 2022
komu: Biogeme
Dear Michel,

Thanks! I have solved this problem!

Best, Lin

在2022年8月27日星期六 UTC+2 12:24:02<michel.b...@epfl.ch> 写道:
Odpovedať všetkým
Odpovedať autorovi
Poslať ďalej
0 nových správ