Genie to Matlab

The front end.
Post Reply
sirinoz
Posts: 3
Joined: Thu May 21, 2015 1:03 pm

Genie to Matlab

Post by sirinoz »

Is that possible to convert the Bayesian network designed in Genie to Matlab?
Thanks in advance.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Genie to Matlab

Post by shooltz[BayesFusion] »

sirinoz wrote:Is that possible to convert the Bayesian network designed in Genie to Matlab?
It depends on what kind of Matlab output you want. There's no direct way to load a .xdsl file into Matlab.
sirinoz
Posts: 3
Joined: Thu May 21, 2015 1:03 pm

Re: Genie to Matlab

Post by sirinoz »

I want probability values of target nodes given some other nodes.
sirinoz
Posts: 3
Joined: Thu May 21, 2015 1:03 pm

Re: Genie to Matlab

Post by sirinoz »

shooltz wrote:
sirinoz wrote:Is that possible to convert the Bayesian network designed in Genie to Matlab?
It depends on what kind of Matlab output you want. There's no direct way to load a .xdsl file into Matlab.

I want probability values of target nodes given some other nodes.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Genie to Matlab

Post by shooltz[BayesFusion] »

sirinoz wrote:I want probability values of target nodes given some other nodes.
You have three options:

1) create an external, standalone executable linked with SMILE. Thie program would be called from Matlab with the system() function.
http://www.mathworks.com/help/matlab/ref/system.html

2) call jSMILE (Java) directly from Matlab:
http://www.mathworks.com/help/matlab/us ... atlab.html

3) call SMILE (C++) directly from Matlab
http://www.mathworks.com/help/matlab/wr ... files.html
ale.mnc
Posts: 9
Joined: Tue Jul 11, 2017 8:45 am

Re: Genie to Matlab

Post by ale.mnc »

Hello,
I am working on the third option of the last post, i.e. calling SMILE (C++) directly from Matlab.
After adding the path leading to SMILE folder, I try to add SMILE library to Matlab with the following code

Code: Select all

loadlibrary('smile','smile.h');
Unfortunately I get the following message from Matlab

Code: Select all

Error using loadlibrary
Failed to preprocess the input file.
 Output from preprocessor is:smile.h
C:\Users\mancusa1\Visual Studio 2015\smile_vc14_x64\smile.h(26): fatal error C1189: #error:  SMILE : in
debug build the runtime library must be set to Multi-threaded Debug DLL
Does anyone know the reason of this error?
Moreover I read on "loadlibrary" description of Matlab that
Functions written in C++ must be declared as extern "C".
I wonder if SMILE functions are declared as extern "C".
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Genie to Matlab

Post by shooltz[BayesFusion] »

I wonder if SMILE functions are declared as extern "C".
They can't be declared as extern "C", because almost all of the SMILE's functionality is exposed as C++ classes (there are a few global functions, but they're a tiny minority).

What you'd need to do is create your own extern "C" function(s) which call into SMILE. This may be doable depeding on what do you want to achieve. I believe it's not a reasonable way to obtain a fully featured SMILE wrapper for Matlab.
Post Reply