Newbie in Smile

The engine.
Post Reply
Gardiola
Posts: 29
Joined: Mon Mar 11, 2013 4:38 pm

Newbie in Smile

Post by Gardiola »

Good morning,

As I decided to use smile, I just refreshed my C++.

I never used smile so please patient with my 3 naïve questions.

objective: I would like to use the network A build in Genie interface from the data set id=1 and applied the network A to a data set id=2.

I am interested to know the risk of one target variable of the network A for the data set id=2.

for each line of the data set id = 2, I would like to test the network A and save this information in another file.

Question 1: Someone can give some idea of code? ( simple example of C++ code will be helpfull).

Question 2: Can use genie in order to apply the same binning of data 1 to data 2 ?

Question 3: Can I use some Monte Carlo Simulation later on based on the probability derived from the estimation specific to data 2 ? Or should there another relevant approach to assess the global risk of my data 2 ?

By advance , thanks for this .

Didier
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Newbie in Smile

Post by shooltz[BayesFusion] »

for each line of the data set id = 2, I would like to test the network A and save this information in another file.
See the DSL_validator class. You can use the Test() method to perform the inference on the contents of the specified dataset. Set the target before the Test() call with AddClassNode(). When Test() finishes you can obtain the results with getter methods (including GetResultDataset). The documentation is sparse or non-existent, so I suggest you check the validator.h header before writing the code.

Note that you can peform the same operation directly from GeNIe with Data|Validate.
Can use genie in order to apply the same binning of data 1 to data 2 ?
If you mean discretization with identical intervals, then you can simply re-type the values obtained for one dataset when discretizing another one.
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: Newbie in Smile

Post by marek [BayesFusion] »

Gardiola wrote: Question 3: Can I use some Monte Carlo Simulation later on based on the probability derived from the estimation specific to data 2 ? Or should there another relevant approach to assess the global risk of my data 2 ?
Didider,

I will be glad to try to help you with Question 3 but you need to be more specific. I will need to understand what exactly you want to do.
Cheers,

Marek
Gardiola
Posts: 29
Joined: Mon Mar 11, 2013 4:38 pm

Re: Newbie in Smile

Post by Gardiola »

Marek and shooltz,

first of all, thanks for your email.

I tried to fix my issue with C++ first before to go further.

I will come back to you later on on this post.

Didier
Gardiola
Posts: 29
Joined: Mon Mar 11, 2013 4:38 pm

Re: Newbie in Smile

Post by Gardiola »

I would like to use the validation output on the data set id=2 to run some MonteCarlo simulation.

Please find the pseudo programm.


for n =1 to N, do simulation

for each element of the data set id =2:

evaluate proba of the "dependant" variable with the Bayesian networks.
Random Number Generation
apply this number to the distribution

Agregation for the simulation

analysis of the distribution of the data set id=2

Cheers

Didier
Post Reply