Using SMILE

The engine.
Post Reply
borisrabin
Posts: 24
Joined: Thu Sep 30, 2010 7:48 pm

Using SMILE

Post by borisrabin »

Hello,

I using C# with Visual studio 2010.
I downloaded : Visual Studio 2010 / VC 10.0 RTM and SMILE Wrappers ( .NET).


Can you please explain what is the steps i should execute in order begin using SMILE?
For example :GreedyThickThinning learning and after the learning read the results(with code).

I read this message from the forum but could not find the option, is this relevant to C# on VS 2010 ?
"
At the project level: open the Project settings window, then select Configuration Properties|Linker|General and set Additional Library Directories' property. Note that this works per-configuration, so you'll have to do that for both debug and release builds. Using this approach works best with relative paths (for example, when you have SMILE libs/headers in some subdirectory in the project dir) "

Thanks in advance,
Boris
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Re: Using SMILE

Post by shooltz[BayesFusion] »

borisrabin wrote: I using C# with Visual studio 2010.
I downloaded : Visual Studio 2010 / VC 10.0 RTM and SMILE Wrappers ( .NET).
Can you please explain what is the steps i should execute in order begin using SMILE?
SMILE is for native C++. Smile.NET is for .Net development, including C#. If you've downloaded Smile.NET binaries, you should be able to use it - just add the reference to smilenet.dll in your project.
borisrabin
Posts: 24
Joined: Thu Sep 30, 2010 7:48 pm

Re: Using SMILE

Post by borisrabin »

shooltz wrote:
borisrabin wrote: I using C# with Visual studio 2010.
I downloaded : Visual Studio 2010 / VC 10.0 RTM and SMILE Wrappers ( .NET).
Can you please explain what is the steps i should execute in order begin using SMILE?
SMILE is for native C++. Smile.NET is for .Net development, including C#. If you've downloaded Smile.NET binaries, you should be able to use it - just add the reference to smilenet.dll in your project.

I made as you said (Referenced to smilenet.dll ) but i can not use the SMILE.net learning implementation .
for example i want use the "GreedyThickThinning gtt = new GreedyThickThinning();"
but the only option i get is : DSL_greedyThickThinning gtt2 = new DSL_greedyThickThinning();
therefor i can not configure the greedy algorithm .

For example can not config:
GreedyThickThinning.PriorsType PriorsMethod {GreedyThickThinning.PriorsType.K2, GreedyThickThinning.PriorsType.BDeu}

or

double NetWeight (get, set)

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

Re: Using SMILE

Post by shooltz[BayesFusion] »

Does it help when you add 'using Smile.Learning;' somewhere in the .cs file?
borisrabin
Posts: 24
Joined: Thu Sep 30, 2010 7:48 pm

Re: Using SMILE

Post by borisrabin »

shooltz wrote:Does it help when you add 'using Smile.Learning;' somewhere in the .cs file?
Thanks , it worked great !

After i learned the network (stored at the "learnedNet" ) , how i can extract all the edges between the nodes.
At another words how i store all dependencies from the Network in some matrix/text ?

For example here is my code:

try
{
GreedyThickThinning gtt = new GreedyThickThinning();
gtt.PriorsMethod=GreedyThickThinning.PriorsType.BDeu;
gtt.NetWeight = 7;

Smile.Learning.DataSet dtSmile = new Smile.Learning.DataSet();
dtSmile.ReadFile("DiscretInput1.txt");
Network learnedNet = gtt.Learn(dtSmile);

gtt.Dispose();

}

catch (SmileException e)
{
Console.WriteLine(e.Message);
}

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

Re: Using SMILE

Post by shooltz[BayesFusion] »

Post Reply