Search found 60 matches

by piotr [BayesFusion]
Fri Jan 20, 2023 11:35 am
Forum: SMILE
Topic: Problem installing pysmile: message error
Replies: 3
Views: 2472

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: 11606

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: 2606

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_knowl...
by piotr [BayesFusion]
Thu May 12, 2022 2:16 pm
Forum: SMILE
Topic: How to save an unrolled network in pySmile?
Replies: 6
Views: 11606

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: 3937

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: 6027

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.
by piotr [BayesFusion]
Thu Apr 14, 2022 9:04 am
Forum: SMILE
Topic: NameError: name 'self' is not defined
Replies: 3
Views: 6027

Re: NameError: name 'self' is not defined

You are trying to run modified Tutorial1 code - in that code self refers to object of Tutorial1 class. Try to remove all self calls from your code and move create_cpt_node fuction definition before calling it. You can learn more about self from here: https://www.w3schools.com/python/gloss_python_sel...
by piotr [BayesFusion]
Thu Sep 30, 2021 12:27 pm
Forum: SMILE
Topic: Documentation
Replies: 2
Views: 4124

Re: Documentation

All available functions could be listed by Python help command e.g. help(pysmile.Network) in Python Interpreter command line. Below is output of this command for Network Class: class Network(pybind11_builtins.pybind11_object) | Method resolution order: | Network | pybind11_builtins.pybind11_object |...
by piotr [BayesFusion]
Wed Jul 14, 2021 1:55 pm
Forum: SMILE
Topic: Ranking Diagnostic Value in SMILE
Replies: 3
Views: 6675

Re: Ranking Diagnostic Value in SMILE

To access Diagnostic Values you have to create DiagNetwork object based on existing Network object. Network net = new Network(); // do some stuff or load network from file DiagNetwork diagNetwork = new DiagNetwork(network); To create a DiagNetwork object, the Network must meet several requirements. ...
by piotr [BayesFusion]
Wed May 05, 2021 3:31 pm
Forum: SMILE
Topic: using rSMILE
Replies: 2
Views: 4121

Re: using rSMILE

You don't need to unpack the .zip archive. Besides, if you have files locally, you need to set the repo parameter to NULL and specify the library type - win.library. The full command for installation will look like this: install.packages("path_to_zip_archive", repos = NULL, type = "wi...
by piotr [BayesFusion]
Mon Mar 29, 2021 7:20 am
Forum: SMILE
Topic: ImportError: DLL load failed while importing pysmile: the specified module could not be found
Replies: 6
Views: 9495

Re: ImportError: DLL load failed while importing pysmile: the specified module could not be found

Could you try to use PySMILE outside a venv? For testing purposes only - to check if it is really a problem of the virtual environment. I wasn't able to recreate an error (both inside and outside venv) so any additional information will be helpful.

PySMILE 1.6.2 should contain learning fix.
by piotr [BayesFusion]
Fri Mar 26, 2021 9:42 am
Forum: SMILE
Topic: ImportError: DLL load failed while importing pysmile: the specified module could not be found
Replies: 6
Views: 9495

Re: ImportError: DLL load failed while importing pysmile: the specified module could not be found

Have you tried to run PySMILE without using venv? Also - could you check if "home" variable in pyenv.cfg file (top of venv folder structure) points to directory which contains python39.dll file?
by piotr [BayesFusion]
Tue Mar 09, 2021 8:37 am
Forum: SMILE
Topic: ImportError: DLL load failed while importing pysmile: the specified module could not be found
Replies: 6
Views: 9495

Re: ImportError: DLL load failed while importing pysmile: the specified module could not be found

At first, you have to unistall pysmile version 0.2 pip uninstall pysmile Second - to get the correct version from our index, use the command below: pip install --no-cache-dir --index-url https://support.bayesfusion.com/pysmile-B/ pysmile Note that PySMILE may not be fully compatible with the Anacond...
by piotr [BayesFusion]
Fri Dec 04, 2020 2:49 pm
Forum: SMILE
Topic: does PySMILE has the capability to use multiple CPU?
Replies: 3
Views: 3872

Re: does PySMILE has the capability to use multiple CPU?

You can use PySMILE code with Python multiprocessing package, like below: import pysmile import pysmile_license import multiprocessing import time ds = pysmile.learning.DataSet() ds.read_file("[path_to_dataset_file]") def learn_net_from_dataset(ds): bs = pysmile.learning.BayesianSearch() b...
by piotr [BayesFusion]
Tue Dec 01, 2020 10:39 am
Forum: SMILE
Topic: import pysmile error in Lunix system
Replies: 5
Views: 4941

Re: import pysmile error in Lunix system

Pip installs PySMILE from local cache. You have to uninstall PySMILE again (pip uninstall pysmile) and install with command: "pip install --no-cache-dir --index-url https://support.bayesfusion.com/pysmile-A/ pysmile"