Set [DSL_NOLEARN = ALL] userproperty in JSMILE?

The engine.
Post Reply
peppe.chiapparo
Posts: 1
Joined: Tue Jun 30, 2009 7:15 am

Set [DSL_NOLEARN = ALL] userproperty in JSMILE?

Post by peppe.chiapparo »

Hello,
i'm new in jsmile. I want to set this property to my node properties.Can you please help me?
I report the code here.

UserProperty[] properties = tNet.getNodeUserProperties("cost");
UserProperty newProperty = new UserProperty("DSL_NOLEARN", "ALL");
List<UserProperty> props = new ArrayList<UserProperty>();

for (int i = 0; i < properties.length; i++) {
UserProperty userProperty = properties;
props.add(userProperty);
}
props.add(newProperty);
properties = (UserProperty[]) props.toArray();
tNet.setUserProperties(properties);



Is it correct?
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Re: Set [DSL_NOLEARN = ALL] userproperty in JSMILE?

Post by shooltz[BayesFusion] »

peppe.chiapparo wrote:Is it correct?
It'll work, but you may want to use one of the following methods in smile.learning.EM class:

Code: Select all

public void learn(DataSet data, Network net, DataMatch[] matching, int[] fixedNodes);
public void learn(DataSet data, Network net, DataMatch[] matching, String[] fixedNodes);
The 'fixedNodes' parameter should contain handles/identifiers of the nodes which don't change their CPTs during EM learning.
Post Reply