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

ยอดดู 34 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

linlin zhang

ยังไม่อ่าน,
26 ส.ค. 2565 09:21:0326/8/65
ถึง 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

ยังไม่อ่าน,
27 ส.ค. 2565 06:24:0227/8/65
ถึง 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

ยังไม่อ่าน,
27 ส.ค. 2565 12:26:1227/8/65
ถึง 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

ยังไม่อ่าน,
27 ส.ค. 2565 12:26:2727/8/65
ถึง Biogeme
Dear Michel,

Thanks! I have solved this problem!

Best, Lin

在2022年8月27日星期六 UTC+2 12:24:02<michel.b...@epfl.ch> 写道:
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ