jSmile Learning Documentation

The engine.
Post Reply
evilK
Posts: 4
Joined: Wed Aug 25, 2010 7:42 pm

jSmile Learning Documentation

Post by evilK »

I have been searching the documentation asociated to the learning aspect of jSmile (DataSets, learning algorithms, etc..), but the only resource that i have found about it is the "jSMILE Learning" section of the wiki (i have also consulted to the C SMILearn section), which seems to not be updated.

I'm not finding in neither of that sections information about the "matchNetwork" method or the Datamatch class, which i have found in some posts of the forum, and probably i would have to use them. I havent found any javadoc neither. So, where can i find this information(complete DataSet documentation etc), am i searching in the wrong places?

Thanks!
evilK
Posts: 4
Joined: Wed Aug 25, 2010 7:42 pm

Re: jSmile Learning Documentation

Post by evilK »

For example, i founded this line here in the forums:

Code: Select all

final DataMatch[] dataMatches = dataSet.matchNetwork(smileNetwork); 
But i can't find where that method(matchNetwork) or class(DataMatch) is documented..
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: jSmile Learning Documentation

Post by shooltz[BayesFusion] »

evilK wrote:But i can't find where that method(matchNetwork) or class(DataMatch) is documented..
It's not documented :)

The matching is simply performed based on the node id and column id. DataMatch.column is 0-based column index in the dataset. DataMatch.node is a node handle. DataMatch.slice is a timeslice number - ignore if you're not dealing with DBNs.
evilK
Posts: 4
Joined: Wed Aug 25, 2010 7:42 pm

Re: jSmile Learning Documentation

Post by evilK »

In fact, DataMatch class it's not in my smile.jar :S. Still, i'm not sure if i need it for something. If i'm using this code for learning, will it work? :

DataSet ds = new DataSet();
ds.readFile("C:/RedesBayesianas/pruebas.txt");
ds.matchNetwork(net); -> do i need this line? what for? It appears me as void, not creating a DataMatch[]...
final EM em = new EM();
em.setEqSampleSize(2); -> learning algorithm parameter, if i'm wright
em.setRandomizeParameters(true); -> Not sure about this, it means that randomize the values of the nodes that are not informed in the txt?
em.learn(ds, net);

Also, there are string values in my input txt, they give any problems with the DataSet? (i see the getInt or getFloat functions, but not something like getString..)

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

Re: jSmile Learning Documentation

Post by shooltz[BayesFusion] »

evilK wrote:In fact, DataMatch class it's not in my smile.jar :S
It must be there, otherwise the build verification script we run before uploading the binaries would fail.
ds.matchNetwork(net); -> do i need this line? what for? It appears me as void, not creating a DataMatch[]...
DataSet.matchNetwork returns an array of DataMatch objects:

Code: Select all

DataMatch[] matching = ds.matchNetwork(net);
which you need to pass to EM.learn later:

Code: Select all

em.learn(ds, net, matching);
EM.setRandomizeParameters will randomize the CPTs of the nodes before learning.
EM.setEqSampleSize sets the equivalent sample size. See GeNIe's EM dialog for more explanation.
evilK
Posts: 4
Joined: Wed Aug 25, 2010 7:42 pm

Re: jSmile Learning Documentation

Post by evilK »

Must be there? I send you a pick with what i found in the "learning" package, as you see there is no DataMatch, matchNetwork is a void and em.learn doesn't need a DataMatch[]

Maybe i'm using an old version or something? :S
Attachments
Dibujo.PNG
Dibujo.PNG (18.43 KiB) Viewed 5116 times
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: jSmile Learning Documentation

Post by shooltz[BayesFusion] »

evilK wrote:Maybe i'm using an old version or something? :S
That's definitely a possibility.
Post Reply