My favorites | Sign in
bnt
Project Home Downloads Wiki Issues Source
Search
for
HowToInstall  
Updated Apr 8, 2011 by murphyk2

To install, just unzip FullBNT.zip, start Matlab, and then add BNT to your path. You can go to File->Set_Path, and then click on "Add Folder with Subfolders" and select the bnt folder. Or you can cd to the directory containing BNT and execute the following

>> cd C:\kmurphy\FullBNT\FullBNT-1.0.4  % modify as needed
>> addpath(genpathKPM(pwd))

The genpathKPM function is like the builtin genpath function, but it does not add directories called 'Old' to the path, thus preventing old versions of functions accidently shadowing new ones. The warnings occur because Matlab 7 added functions with the same names as my functions. The BNT versions will shadow the built-in ones, but this should be harmless. (Note: the functions installC_BNT etc. are not needed anymore: all C code has either been removed or is unnecessary.)

Now test your installation:

>> test_BNT

With new versions of matlab you will get lots of warning messages, but everything should still work. In particular, you will definitely see a warning like this:

Warning: Function D:\Program Files\MatLab\Works\BNT\KPMtools\assert.m has the same
name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. 

This is harmless and can be ignored.

Note: Cory Reith tells me that, as of 15 Sep 2009, octave 3.2.2 can run most of BNT. Please send email to crieth@ucsd.edu if you have questions.

Comment by yaseen0...@gmail.com, Feb 24, 2010

hello, I tried to install BNT with MatLab? V.9 and V.8, and i follow the process of installation afte i unzip FullBNT.zip. i have ab error appear in the secreen when i tried to addpath(genpathKPM(pwd)). the error is: ??? Undefined function or method 'genpathKPM' for input arguments of type 'char'

could you please help me to make it work.

best regards,

Comment by peter.na...@gmail.com, Feb 24, 2010

I also get the same error message when i try to execute the addpath function as shown above.

Comment by skrawczy...@gmail.com, Mar 2, 2010

Hello, i tried to install BNT with Matlab 7.6.0, following the process you described at the top of this page but it doesn't work. It tells me this :

??? Undefined function or variable 'test_BNT'.

Could you help me please ?

Thank you best regards

Comment by hejian...@163.com, Mar 11, 2010

hello, I tried to install BNT with MatLab? 7.9.0 , and i follow the process of installation afte i unzip FullBNT.zip. i have ab error appear in the secreen when i tried to addpath(genpathKPM(pwd)). the error is: ??? Undefined function or method 'genpathKPM' for input arguments of type 'char'

could you please help me to make it work.

best regards,

Comment by hustfl...@gmail.com, Apr 2, 2010

hello, I tried to install BNT with MatLab?? 7.9.0 , and i follow the process of installation afte i unzip FullBNT.zip. i have ab error appear in the secreen when i tried to addpath(genpathKPM(pwd)). the error is: ??? Undefined function or method 'genpathKPM' for input arguments of type 'char'

could you please help me to make it work.

best regards,

Comment by shaun.ma...@gmail.com, Apr 7, 2010

Using the newer versions of Matlab (7.8+), you will have to replace calls to the obsolete FINITE with ISFINITE before the test will work.

For example, in BNT/examples/static/Zoubin/ffa.m and BNT/examples/static/Zoubin/mfa.m

Comment by enr.dile...@gmail.com, Apr 9, 2010

Following the above instructions will result in the error message that everyone posted. I have some hypothesis about why this happens, but I will stick to the workaround I found. To add bnt to Matlab path, go to File->Set_Path? then click on Add Folder with Subfolders and select the bnt folder. It may not be the cleanest way, but it works. I will be happy to have suggestions on how to make it work in a better way.

Best

Comment by hustfl...@gmail.com, Apr 9, 2010

Thank you very much.

Comment by hustfl...@gmail.com, Apr 9, 2010

enr.dilello, I do not know your name. But I would like to discuss something about matlab with you. May I have your email address?

best regards

Comment by project member murphyk2, May 5, 2010

genpathKPM should be on your path if you cd to the BNT directory first. Please follow the new instructions and let me know.

if someone wants to please replace FINITE with ISFINITE, I'll give them source access :) (maybe)

Comment by project member wsun18@gmail.com, May 9, 2010

I just tested installation of the latest verion FullBNT_1.07 uploade on 09 May, 2010. After following on Kevin's instruction on the top of this page, everything runs without any error.

Comment by dmb...@gmail.com, Jun 12, 2010

I intalled FullBNT_1.07 on 12 Jun, 2010 following the latest instructions. Most of the errors that I used to get no longer appear. However there is still one error:

Warning: Function /Users/dmblum/Documents/MATLAB/bnt/KPMtools/assert.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. > In hgrc at 154

In matlabrc at 98

Is this a problem?

Comment by tianyu.t...@gmail.com, Jun 29, 2010

installed fine though a minor issue with matlab version 7.10.0.499 (R2010a) is that "finite.m" is apparently obsolete. after replacing with the suggested "isfinite.m" the code seemed to work fine.

Comment by marco.gr...@gmail.com, Nov 9, 2010

hi there, I am having troubles running it on octave 3.2.4: octave:1> addpath(genpathKPM(pwd)) octave:2> test_BNT warning: isstr is obsolete and will be removed from a future version of Octave, please use ischar instead ll =

-6.7075e-12 -1.4435e-11

error: A(I): Index exceeds matrix dimension. error: called from: error: FullBNT-1.0.4/BNT/CPDs/@tabular_CPD/tabular_CPD.m at line 74, column 1 error: FullBNT-1.0.4/BNT/examples/static/Models/mk_incinerator_bnet.m at line 44, column 18 error: FullBNT-1.0.4/BNT/examples/static/cg2.m at line 4, column 7 error: FullBNT-1.0.4/BNT/test_BNT.m at line 6, column 1 octave:2> version ans = 3.2.4 octave:3>

Cheers

Comment by tsila...@gmail.com, Nov 10, 2010

This error is due to different short circuiting in octave and matlab. Changing & to && in FullBNT-1.0.4/BNT/CPDs/@tabular_CPD/tabular_CPD.m at line 74 will get you to the next error ;)

Comment by qtian...@gmail.com, Jan 19, 2011

I tried to run the example and got this error: ??? Undefined command/function 'mysetdiff'.

Could you please help me here? Thank you

Comment by zhangyan...@gmail.com, Feb 14, 2011

@qtian... I just tried version 1.0.7, no problem during installation.

Comment by ben.domi...@gmail.com, Mar 2, 2011

After changing & to && as indicated in the Nov 10 comment (to get around that error), I have this one:

octave:2> test_BNT warning: isstr is obsolete and will be removed from a future version of Octave, please use ischar instead ll =

2.9612e-11 -1.4435e-11

cycle 1 lik -54.8376 cycle 2 lik -50.7286 cycle 3 lik -49.3337 EM iteration 1, ll = -54.8376 error: structure has no member `dag' error: evaluating argument list element number 1 error: evaluating argument list element number 1 error: called from: error: /home/bd/Dropbox/bifactor_FR/bnt/BNT/learning/learn_params_em.m at line 59, column 3 error: /home/bd/Dropbox/bifactor_FR/bnt/BNT/learning/learn_params_em.m at line 36, column 21 error: /home/bd/Dropbox/bifactor_FR/bnt/BNT/examples/static/fa1.m at line 43, column 15 error: /home/bd/Dropbox/bifactor_FR/bnt/BNT/test_BNT.m at line 8, column 1

Any thoughts?

Comment by ben.domi...@gmail.com, Mar 4, 2011

The March 2 comment I made seems to be an octave-specific error. Installation seems to work fine with matlab.

Comment by pzhang...@comcast.net, May 26, 2011

I have run test_BNT on matlab 2006a, after some data printed out, the following errors appeared:

??? Undefined function or variable 'foptions'.

Error in ==> softmax_CPD.maximize_params at 9 options = foptions;

Error in ==> learn_params_em>EM_step at 83

CPDs{e} = maximize_params(CPDs{e});

Error in ==> learn_params_em at 36

[engine, loglik] = EM_step(engine, evidence);

Error in ==> mixexp2 at 88 [bnet2, LL2] = learn_params_em(engine, cases, max_iter);

Error in ==> test_BNT at 19 mixexp2

Please advise what I should do.

Thanks.

Comment by seixas.f...@gmail.com, Aug 4, 2011

I tested version 1.0.7 on Octave, after test_BNT command, the following error appeared: A(I): Index exceeds matrix dimension called from: g:\matlab\bnt\BNT\CPDs\@tabular\tabular_CPD.m at line 74, column 1 g:\matlab\bnt\BNT\examples\static\Models\mk_incinerator_bnet.m at line 44, column 18 g:\matlab\bnt\BNT\examples\static\cg2.m at line 4, column 7 g:\matlab\bnt\BNT\test_BNT.m at line 6, column 1

I would appreciate any help.

The Octave is 3.2.4 version.

Thank you, Flavio

Comment by m...@fls.unipi.it, Aug 18, 2011

I have installed bnt on Matlab 7.6.0 (R2008a) and the m file test_BNT stopped with the following errors:

learning ??? Improper assignment with rectangular empty matrix.

Error in ==> repmat at 54

B(nelems) = A;

Error in ==> unroll_set at 6 U = repmat(S(:), T?) + offset;

Error in ==> learn_params_dbn_em>EM_step at 140

cnodes = unroll_set(bnet.cnodes_slice, ss, T);

Error in ==> learn_params_dbn_em at 82

[engine, loglik, logpost] = EM_step(engine, evidence, temperature);

Error in ==> cmp_learning_dbn at 52

[bnet2{i}, LL{i}] = learn_params_dbn_em(engine{i}, cases, 'max_iter', max_iter);

Error in ==> bat1 at 36 time = cmp_learning_dbn(bnet, engine, T)

Error in ==> test_BNT at 73 bat1

Can you help me? Thanks in advance

Alberto

Comment by mohammad...@gmail.com, Oct 22, 2011

I have a problem in performance BNs and DBNs methods for time-series data(e.g. fMRI data). if possible a example of there methods sent me. mohammadali.safari@gmail .com

Comment by jmmc...@gmail.com, Jan 17, 2012

I have installed bnt on Matlab 7.9.0 (R2009b) and the m file test_BNT stopped with the following errors in both the chmm1 and ghmm1 examples:

??? Error using ==> logdet.logdet at 16 logdet can only be applied to Hermitian SDPVAR objects

Error in ==> mixgauss_prob at 93

logB2 = -(d/2)log(2*pi) - 0.5*logdet(Sigma(:,:,j)) - 0.5*D;

It appears that the function logdet is looking for an spdvar object, but is receiving a matrix.

Can you help? Thanks.

--JM

Comment by bklynch....@gmail.com, Feb 22, 2012

Installed on Matlab 7.8.0 (R2009a) without any problems (except expected error message about file naming as mentioned in the instructions). Be sure to change the directory to the "bnt" directory created during extraction of the .zip file. If you create a directory on C: for the .zip file (C:\BNT) and extract the files to that folder, it will create a folder called "bnt" (ie. C:\BNT\bnt) and that is the folder you need to change to within Matlab.


Sign in to add a comment
Powered by Google Project Hosting