Memory Error when make inference for my datasets & type error when make inference and simulation procedure

The engine.
Post Reply
Yang Yajie
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

Post by Yang Yajie »

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
Attachments
typeerror.png
typeerror.png (113.07 KiB) Viewed 2850 times
Last edited by Yang Yajie on Wed Oct 05, 2022 7:58 pm, edited 1 time in total.
piotr [BayesFusion]
Site Admin
Posts: 60
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

Post by piotr [BayesFusion] »

Code: Select all

a=net.get_node_value(net.get_node_id(h),i)
get_node_value method call is invalid - it takes only one argument (node ID or handle). I am not sure if this loop is necessary

Code: Select all

while i<=len(v):
	a=net.get_node_value(net.get_node_id(h),i)
	res.append(a)
	i=i+1
Because you already have node value in v variable (line 93)

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?
Post Reply