Search found 69 matches

by piotr [BayesFusion]
Mon Aug 07, 2023 7:19 pm
Forum: SMILE
Topic: rSMILE ErrNo=-5
Replies: 1
Views: 32314

Re: rSMILE ErrNo=-5

Can I ask you for a piece of code that causes this error? If you don't want to share it publicly, please send a PM.
by piotr [BayesFusion]
Thu Jun 15, 2023 3:08 pm
Forum: SMILE
Topic: rSMILE Network$clearEvidence
Replies: 11
Views: 90921

Re: rSMILE Network$clearEvidence

I think you forgot the parentheses calling the clearAllEvidence function.

Change this code:
net$clearAllEvidence

to this code:
net$clearAllEvidence()

in your script. Clearing the evidence in the network that I got in PM works as intended - after calling clearAllEvidence, the contiguous node ...
by piotr [BayesFusion]
Wed Jun 14, 2023 2:25 pm
Forum: SMILE
Topic: rSMILE Network$clearEvidence
Replies: 11
Views: 90921

Re: rSMILE Network$clearEvidence

Are you using rSMILE 2.0.10? There were changes between this version and previous ones that could affect the results when using various Virtual Evidence methods.

Also - can I ask you to share the xdsl file by email or in a private message on the forum? I tried to replicate this behavior with ...
by piotr [BayesFusion]
Mon Jun 12, 2023 9:21 am
Forum: SMILE
Topic: rSMILE Network$clearEvidence
Replies: 11
Views: 90921

Re: rSMILE Network$clearEvidence

Note that:
  • evidence is not cleared after updateBeliefs
  • the node value has a 'valid' flag, which can be checked with isValueValid
  • setting or clearing the evidence invalidates the value of the node
  • node values are valid when updateBeliefs is successful
by piotr [BayesFusion]
Fri Jun 09, 2023 5:13 pm
Forum: SMILE
Topic: rSMILE Network$clearEvidence
Replies: 11
Views: 90921

Re: rSMILE Network$clearEvidence

Could you please share the code that doesn't work? If you don't want to share it on the forum, you can email me at piotr@bayesfusion.com

Code below works fine with rSMILE 2.0.10

net <- Network()
handle <- net$addNode(net$NodeType$CPT)
net$setNodeDefinition(handle, c(0.2, 0.8))
net$updateBeliefs ...
by piotr [BayesFusion]
Fri Jun 09, 2023 10:18 am
Forum: SMILE
Topic: printNodeInfo rSMILE on hybrid BBNs?
Replies: 1
Views: 29692

Re: printNodeInfo rSMILE on hybrid BBNs?

You cannot use the printNodeInfo function from Tutorial 3 to print non-CPT node values without any modification.
See Tutorial 7 (Continuous model) and Tutorial 8 (Hybrid model). There are examples of how to create, modify and read values from Equation nodes.
by piotr [BayesFusion]
Fri Jun 09, 2023 8:09 am
Forum: SMILE
Topic: rSMILE Network$clearEvidence
Replies: 11
Views: 90921

Re: rSMILE Network$clearEvidence

I guess using net$getNodeValue is not the best course of action, as there is no value set after I clear the evidence, right?
Yes, you have to call net$updateBeliefs before getting node values.
by piotr [BayesFusion]
Wed Jun 07, 2023 7:36 am
Forum: SMILE
Topic: rSMILE Network$clearEvidence
Replies: 11
Views: 90921

Re: rSMILE Network$clearEvidence

ClearEvidence function should work on chance nodes. Can you share the code you think is not working?
by piotr [BayesFusion]
Mon Feb 27, 2023 9:25 am
Forum: GeNIe
Topic: BayesBox and BayesMobile released
Replies: 6
Views: 127472

Re: BayesBox and BayesMobile released

At this moment BayesMobile is not able to change the definition of the network, which includes observations, strengths and diagnostic faults.
You can modify your network in GeNIe or with SMILE and then load it to BayesMobile.
by piotr [BayesFusion]
Fri Jan 20, 2023 11:35 am
Forum: SMILE
Topic: Problem installing pysmile: message error
Replies: 3
Views: 37250

Re: Problem installing pysmile: message error

We had a problem with our pip server.

Try code below again - now it should work.

Code: Select all

"!{sys.executable} -m pip install --index-url https://support.bayesfusion.com/pysmile-A/ pysmile"
by piotr [BayesFusion]
Fri May 13, 2022 7:48 am
Forum: SMILE
Topic: How to save an unrolled network in pySmile?
Replies: 6
Views: 65070

Re: How to save an unrolled network in pySmile?

This is my mistake in the previous post - use write_file method on unrolled property.

Code: Select all

unroll_results.unrolled.write_file("filename.xdsl")
by piotr [BayesFusion]
Thu May 12, 2022 2:44 pm
Forum: SMILE
Topic: how to set background knowledge by pysmile
Replies: 1
Views: 30768

Re: how to set background knowledge by pysmile

You can set Background Knowledge before calling learn method of chosen algorithm.


...
bkk = pysmile.learning.BkKnowledge()
bkk.match_data(self.ds)
bkk.add_forbidden_arc("node_id", "outcome_id")
bkk.add_forced_arc("node_id", "outcome_id")
baySearch.set_bk_knowledge(bkk)
net = baySearch.learn(self ...
by piotr [BayesFusion]
Thu May 12, 2022 2:16 pm
Forum: SMILE
Topic: How to save an unrolled network in pySmile?
Replies: 6
Views: 65070

Re: How to save an unrolled network in pySmile?

UnrollResults contains unrolled PyNetwork and mapping (an array). You can simply save unrolled network by write_file method call e.g.

Code: Select all

unroll_results = net.unroll()
unroll_results.write_file("filename.xdsl")
by piotr [BayesFusion]
Wed Apr 20, 2022 8:52 am
Forum: SMILE
Topic: ErrNo=-103
Replies: 3
Views: 39571

Re: ErrNo=-103

Probably the directory where you opened the Python Interpreter is different from where you have the xdsl file, so you get the error code responsible for the missing file. Try to open the Interpreter in the folder with the xdsl file, or enter the absolute path when reading the file (net.read_file ...).
by piotr [BayesFusion]
Thu Apr 14, 2022 12:50 pm
Forum: SMILE
Topic: NameError: name 'self' is not defined
Replies: 3
Views: 16580

Re: NameError: name 'self' is not defined

Remove self from create_cpt_node arguments.

Code: Select all

...

def create_cpt_node(net, id, name, outcomes, x_pos, y_pos):

...
Also - I can't see print_all_posteriors function declaration. You have to copy that function from our tutorial.