hello, I am creating my DBN and make the inference, after that, I plan to simulate the status of the node according to the value probability after update temporal beliefs. when i update_and_show_temporal_results(net) after cite the datasets by using while loop, net.set_temporal_evidence("Node name",1,datasets['node name']. the results shown "Memory Error". Could you please tell how to slove this problem? my python is 64 bites and my anaconda is 64 bites version too.
to make the simulation procedure, i set evidence for one situation by "net.set_temporal_evidence("Age",0,0)", then it works. when i add the simulation procedure in my code, i got the TypeError in the picture.i upload my code and error in the attachment. could you please tell me how to modify my code? Thank you very much!
kind regards!
Yajie
Memory Error when make inference for my datasets & type error when make inference and simulation procedure
-
- Posts: 34
- Joined: Thu Mar 19, 2020 11:49 am
Memory Error when make inference for my datasets & type error when make inference and simulation procedure
- Attachments
-
- typeerror.png (113.07 KiB) Viewed 2917 times
Last edited by Yang Yajie on Wed Oct 05, 2022 7:58 pm, edited 1 time in total.
-
- Site Admin
- Posts: 61
- Joined: Mon Nov 06, 2017 6:41 pm
Re: Memory Error when make inference for my datasets & type error when make inference and simulation procedure
Code: Select all
a=net.get_node_value(net.get_node_id(h),i)
Code: Select all
while i<=len(v):
a=net.get_node_value(net.get_node_id(h),i)
res.append(a)
i=i+1
MemoryError can occur because of an incorrect data imported by pandas - are you sure that the data you are referring to when calling the function set_temporal_evidence are integers?