My favorites | Sign in
bnt
Project Home Downloads Wiki Issues Source
Search
for
WhyFree  
Updated Jan 28, 2010 by mattbdun...@gmail.com

Why do I give the code away?

  • I was hoping for a Linux-style effect, whereby people would contribute their own Matlab code so that the package would grow. With a few exceptions, this has not happened, although several people have provided bug-fixes (see the acknowledgements). Perhaps the Open Bayes Project will be more succesful in this regard, although the evidence to date is not promising.

  • Knowing that someone else might read your code forces one to document it properly, a good practice in any case, as anyone knows who has revisited old code. In addition, by having many "eye balls", it is easier to spot bugs.
  • I believe in the concept of reproducible research. Good science requires that other people be able to replicate your experiments. Often a paper does not give enough details about how exactly an algorithm was implemented (e.g., how were the parameters chosen? what initial conditions were used?), and these can make a big difference in practice. Hence one should release the code that was actually used to generate the results in one's paper. This also prevents re-inventing the wheel.
  • I was fed up with reading papers where all people do is figure out how to do exact inference and/or learning in a model which is just a trivial special case of a general Bayes net, e.g., input-output HMMs, coupled-HMMs, auto-regressive HMMs. My hope is that, by releasing general purpose software, the field can move on to more interesting questions. As Alfred North Whitehead said in 1911, "Civilization advances by extending the number of important operations that we can do without thinking about them."
Comment by liyangde...@gmail.com, Feb 3, 2010

cool~

Comment by vic...@gmail.com, Jul 6, 2010

very wise article.

Comment by fuji.man...@gmail.com, Jul 12, 2010

Thanks!

Comment by chiwei...@gmail.com, Aug 6, 2010

thank you

Comment by wdlan...@gmail.com, Oct 12, 2010

thank you very much!

Comment by whereasw...@gmail.com, Oct 15, 2010

It's very helpful

Comment by Nourdine...@gmail.com, Nov 24, 2010

Nothing to add Bravo Monsieur!!

Comment by sjzevery...@gmail.com, Aug 13, 2011

thank you

Comment by rafe.tor...@gmail.com, Sep 19, 2011

hi Email Address:::: rafe.torabi@gmail.com

help me ; help me plz I write code for Inference but it have error below:::

??? Error using ==> subsindex Function 'subsindex' is not defined for values of class 'cell'.

Error in ==> discrete_CPD.convert_to_table at 14 T = CPT(index{:});

Error in ==> discrete_CPD.convert_to_pot at 20

T = convert_to_table(CPD, domain, evidence);

Error in ==> jtree_inf_engine.enter_evidence at 57

pot{n} = convert_to_pot(bnet.CPD{e}, pot_type, fam(:), evidence);

Error in ==> Rafe_inference at 116 engine,loglik? = enter_evidence(engine,evidence);

my code is :::::

clear all

clc

A?=xlsread('E:\DATA MINING\final_cut.xlsx');

N=6;

dag=zeros(N,N);

AS=1;AM=2;CC=3;SC=4;VT=5;DA=6;

dag(3:6,AS)=1;dag(2,3)=1;dag(3,4)=1;

discrete_nodes=1:N;

node_sizes=3 9 9 21 10?;

onodes=2:6;

bnet=mk_bnet(dag,node_sizes,'observed',onodes);

draw_graph(bnet.dag);

bnet.CPD{AS}=tabular_CPD(bnet,AS);

bnet.CPD{AM}=tabular_CPD(bnet,AM);

bnet.CPD{CC}=tabular_CPD(bnet,CC);

bnet.CPD{SC}=tabular_CPD(bnet,SC);

bnet.CPD{VT}=tabular_CPD(bnet,VT);

bnet.CPD{DA}=tabular_CPD(bnet,DA);

TrainingSamples??=cell(N,size(A,1));

for i = 1 : size(A,1)

TrainingSamples??(1,i)={A(i,1)'}; TrainingSamples??(2,i)={A(i,2)'}; TrainingSamples??(3,i)={A(i,3)'}; TrainingSamples??(4,i)={A(i,4)'}; TrainingSamples??(5,i)={A(i,5)'}; TrainingSamples??(6,i)={A(i,6)'}; end

bnet=learn_params(bnet,TrainingSamples??);

engine = jtree_inf_engine(bnet);

evidence = cell(1,N);

evidence{AM} = {A(i,2)'};

evidence{CC} = {A(i,3)'};

evidence{SC} = {A(i,4)'};

evidence{VT} = {A(i,5)'};

evidence{DA} = {A(i,6)'};

engine,loglik? = enter_evidence(engine,evidence);

marg = marginal_nodes(engine, AS);

Comment by jianghua...@gmail.com, Oct 5, 2011

I admire your comments on reproducible research.

Comment by gli.gogr...@gmail.com, Feb 17, 2012

I couldn't agree more!


Sign in to add a comment
Powered by Google Project Hosting