Search found 28 matches

by piotr [BayesFusion]
Mon Jul 20, 2020 12:26 pm
Forum: SMILE
Topic: I can not import pysmile in my mac.
Replies: 7
Views: 1046

Re: I can not import pysmile in my mac.

Ad 1: There could be mismatch between DataSet and Network. If your network contains deterministic nodes and dataset contains informations conflicting with network EM Algorithm will not work. You can attach DataSet and XDSL to next message - this will allow us to check what is wrong. Ad 2: There is a...
by piotr [BayesFusion]
Mon Jul 20, 2020 9:57 am
Forum: SMILE
Topic: Memory Error when make inference for my datasets & type error when make inference and simulation procedure
Replies: 1
Views: 254

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

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 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 variabl...
by piotr [BayesFusion]
Fri Jul 17, 2020 10:45 am
Forum: SMILE
Topic: I can not import pysmile in my mac.
Replies: 7
Views: 1046

Re: I can not import pysmile in my mac.

I assume you managed to create a network in GeNIe.

Do I understand correctly that you want to connect all nodes from one layer with all nodes of another layer including time steps?
by piotr [BayesFusion]
Thu Jul 02, 2020 5:53 pm
Forum: SMILE
Topic: I can not import pysmile in my mac.
Replies: 7
Views: 1046

Re: I can not import pysmile in my mac.

Package installed by pip is not BayesFusion's PySMILE. To use PySMILE, you need to uninstall pysmile installed by pip. pip uninstall pysmile Download PySMILE from our website - https://download.bayesfusion.com/ and uncompress archive in your project directory. Note that PySMILE works with official P...
by piotr [BayesFusion]
Thu Jun 04, 2020 9:03 am
Forum: SMILE
Topic: Enable diagnosis for nodes using pysmile wrapper
Replies: 3
Views: 1387

Re: Enable diagnosis for nodes using pysmile wrapper

First argument of set_node_diag_type method is node handle or node ID. Second argument represents diagnostic type. By default, all nodes are Auxiliary. You can change diagnostic type by calling e.g. net.set_node_diag_type("Fault Node ID", pysmile.NodeDiagType.FAULT) net.set_node_diag_type("First Obs...
by piotr [BayesFusion]
Tue Apr 14, 2020 4:16 pm
Forum: SMILE
Topic: node backgorund color and node discretization
Replies: 2
Views: 1183

Re: node backgorund color and node discretization

Ad 1 Node background color could be setted this way: net.set_node_bg_color(handle, 0x0000ff) net.set_node_bg_color(handle, 0x123456) Hexadecimal numbers seem to be the easiest way when it comes to color reading, however, SMILE was initially written in the Windows environment, so color format is reve...
by piotr [BayesFusion]
Fri Nov 29, 2019 12:59 pm
Forum: SMILE
Topic: Parameter learner not optimising a DBN's temporal CPT's in PySMILE
Replies: 8
Views: 3737

Re: Parameter learner not optimising a DBN's temporal CPT's in PySMILE

Network matching in SMILE wrappers works with BN's only. However, this functionality would be added in 1.4.2 release (first week of December), so if you are not in hurry, we advise you to wait a few days. In otherwise, you have to match network manually.
by piotr [BayesFusion]
Tue Nov 26, 2019 10:35 am
Forum: SMILE
Topic: Reading temporal arcs and small bug in SMILE wrapper documentation
Replies: 4
Views: 2525

Re: Reading temporal arcs and small bug in SMILE wrapper documentation

Unfortunately, there is no function that returns all temporal arcs in Network, but you can narrow down the search area and iterate nodes placed on Temporal Plate by net.get_temporal_children(node) - it should be slightly faster than net.get_temporal_parents(node, order).
by piotr [BayesFusion]
Mon Nov 25, 2019 11:05 am
Forum: SMILE
Topic: Reading temporal arcs and small bug in SMILE wrapper documentation
Replies: 4
Views: 2525

Re: Reading temporal arcs and small bug in SMILE wrapper documentation

TemporalInfo is a class that contains three fields - handle, id and order. Fields could be accesed by: parentArr = net.get_temporal_parents(node, order) parentArr[0].handle parentArr[0].id parentArr[0].order (with assumption, that temporal arcs exists, so parentArr is not empty) Exception is raised ...
by piotr [BayesFusion]
Mon May 27, 2019 1:07 pm
Forum: SMILE
Topic: S-function in Simulink
Replies: 5
Views: 3624

Re: S-function in Simulink

There is slightly-improved Smile-Matlab wrapper: matsmile.cpp It has minimal functionality to support Discrete Bayesian Networks. Hello program that uses wrapper looks like this: net = matsmile('newNetwork'); matsmile('readFile', net, 'VentureBN.xdsl'); matsmile('setEvidence', net, 'Forecast', 'Mode...
by piotr [BayesFusion]
Wed May 15, 2019 7:00 pm
Forum: SMILE
Topic: S-function in Simulink
Replies: 5
Views: 3624

Re: S-function in Simulink

matsmile.cpp I added node and outcome validation, so the debugging process should be easier now. Getting node value depends on its type, but most common case (CPT node) is described here https://support.bayesfusion.com/docs/SMILE/using_node_value.html . If your network contains Equation nodes, you ...
by piotr [BayesFusion]
Tue May 07, 2019 4:51 pm
Forum: SMILE
Topic: S-function in Simulink
Replies: 5
Views: 3624

Re: S-function in Simulink

matsmile.cpp At first, you have to make sure, that C++ compiler chosen by Matlab is compatible with Smile binaries. mex -setup cpp If there is compatibility, change directory to the one where the Smile was unpacked. cd('full/path/to/smile/directory'); The easiest way I found was to implement new Me...
by piotr [BayesFusion]
Tue Dec 11, 2018 7:32 pm
Forum: SMILE
Topic: Sample code (Python preferred) for Dynamic Bayesian Network
Replies: 14
Views: 9538

Re: Sample code (Python preferred) for Dynamic Bayesian Network

self.change_evidence_and_update(net, 'e_proponer', 1, 'Bajo') self.change_evidence_and_update(net, 'e_aportar', 2, 'Bajo') self.change_evidence_and_update(net, 'e_proponer', 4, 'Medio') self.change_evidence_and_update(net, 'e_aportar', 5, 'Medio') self.change_evidence_and_update(net, 'e_colaborar',...
by piotr [BayesFusion]
Mon Nov 19, 2018 3:00 pm
Forum: SMILE
Topic: Sample code (Python preferred) for Dynamic Bayesian Network
Replies: 14
Views: 9538

Re: Sample code (Python preferred) for Dynamic Bayesian Network

We have noticed that something is not quite right with network definition. You probably have not set nodes definition for t=0 (ex. Proponer_E) def_ex.PNG It should be set with method set_node_definition (not like other slices - set_node_temporal_definition). Also notice, that in SMILE 'time' variabl...
by piotr [BayesFusion]
Fri Nov 16, 2018 3:04 pm
Forum: SMILE
Topic: Sample code (Python preferred) for Dynamic Bayesian Network
Replies: 14
Views: 9538

Re: Sample code (Python preferred) for Dynamic Bayesian Network

def print_posteriors(net, node_handle): node_id = net.get_node_id(node_handle) if net.is_evidence(node_handle): print(node_id + " has evidence set (" + net.get_outcome_id(node_handle, net.get_evidence(node_handle)) + ")") else : posteriors = net.get_node_value(node_handle) n = net.get_outcome_count...