SMILE procedures

The engine.
Post Reply
tloy1966
Posts: 20
Joined: Thu May 12, 2011 2:40 am

SMILE procedures

Post by tloy1966 »

Greetings!!!

I am newbie to Computer Science(CS) who interest in Bayesian Network(BN) :?

when i study in statistic field , they can handle model with statistic method which called Structural Equation Modeling(SEM)

and in CS field , we can model a problem with BN , then make a decision

like i said before , then i got a lots of problem with Using SMILE....

Q1. i had read SMILE Tutorials,the procedures are (i)create a model with node and arc, (ii)give the probability, (iii)Performing Inference with BN

if i had made my model with background knowledge, and i have data,

Can i perform Inference with SMILE by follow procedure ????(i) create my model, (ii)read data from .csv file , so i don't need to fill the conditional distribution with many node (iii) Performing Inference with BN

Or i have to perform Inference by Genie?

thanks :)
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Re: SMILE procedures

Post by shooltz[BayesFusion] »

Can i perform Inference with SMILE by follow procedure ????(i) create my model, (ii)read data from .csv file , so i don't need to fill the conditional distribution with many node (iii) Performing Inference with BN
If the .csv file contains the learning data, you can run EM algorithm (parameter learning) as step 2 in your procedure.
tloy1966
Posts: 20
Joined: Thu May 12, 2011 2:40 am

Re: SMILE procedures

Post by tloy1966 »

Thanks a lot!

I will try this :D

-----------------------------------------------------------------
Is my steps of perform Bayesian Network right????????????

In my related work. There are about one thousand nodes and many links....

I had a network which made by background knowledge. And how can i use Genie or Smile to perform Bayesian Network.

I have read some documents in this website.

And one my idea of using Genie by following steps
(i) File → Open data file → Data → Learn new network → Background Knowledge → Build my network

but like i said i have one thousand nodes and links...so i think about using Smile by following steps

(i) Create nodes (ii) Create links between nodes (iii) run EM algorithm (iv) performing Inference with BN

Is that steps right???


Thanks again :D
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Re: SMILE procedures

Post by shooltz[BayesFusion] »

(i) Create nodes (ii) Create links between nodes (iii) run EM algorithm (iv) performing Inference with BN
Is that steps right???
Yes, this is the correct approach when you have the network structure already.
tloy1966
Posts: 20
Joined: Thu May 12, 2011 2:40 am

Re: SMILE procedures

Post by tloy1966 »

thanks !!!!
tloy1966
Posts: 20
Joined: Thu May 12, 2011 2:40 am

Re: SMILE procedures

Post by tloy1966 »

Thanks again :D

Here is my simple test using VS2010 to create a Bayesian network

Q1 : I can run this without problem! But i don't know is that right?

Another question is about why run em algorithm when i have no miss value???

Sorry for lack domain knowledge... :oops:

Q2 : Has any website or paper can explain the reason!!?

Thanks!!!
#include "StdAfx.h"
#include <iostream>
#include "smile.h"
#include "smilearn.h"

using namespace std;

void testBN()
{
//read data
DSL_dataset d;
DSL_datasetParseParams params;
params.columnIdsPresent = false;
d.ReadFile("ds_tut_5.txt", &params);

//read network
DSL_network result;
result.ReadFile("net_tut_5.xdsl");

//match data with network
vector<DSL_datasetMatch> matches;
string err;
d.MatchNetwork(result, matches, err);


//run em algorithm
DSL_em em;
em.Learn(d, result, matches);

result.WriteFile("test.xdsl");
}


int main()
{
testBN();
}
Post Reply