Is it possible to set the target names for the set of states associated with a node of Diagnostic type: Target ?
In the Genie UI, this can be done in the General tab of the Node properties dialog. Specifically, I would like to do the equivalent of setting the Target name format dropdown menu to User Defined, and then changing the name for each state as shown in the Special name column. I would like to perform this sequence of operations in Java using the jsmile library.
See the attached screen-shot of the dialog.
Thanks,
Ray
Set the target state names with jsmile
Set the target state names with jsmile
- Attachments
-
- The Node properties dialog
- NodeProperties.png (39.49 KiB) Viewed 5694 times
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: Set the target state names with jsmile
You can use one of the Network.setOutcomeLabel and Network.getOutcomeLabel overloads. These methods operate on the attribute called "Special Name" in GeNIe (when "Target name format" is set to "User Defined").
There's no jSMILE API for controlling the "Target name format" value displayed in GeNIe.
There's no jSMILE API for controlling the "Target name format" value displayed in GeNIe.
Re: Set the target state names with jsmile
I tried Network.setOutcomeLabel and it doesn't set the string in the "Special Name" column - it instead sets the string shown in the "State ID" column. I also tried Network.setOutcomeDescription (also unsuccessful).You can use one of the Network.setOutcomeLabel and Network.getOutcomeLabel overloads. These methods operate on the attribute called "Special Name" in GeNIe (when "Target name format" is set to "User Defined").
Any other ideas?
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: Set the target state names with jsmile
You're right, the get/setOutcomeLabel methods do not work with the "Special name". Generally, the per-outcome attributes are a mess due to backward compatibility.raywonqa wrote:I tried Network.setOutcomeLabel and it doesn't set the string in the "Special Name" column - it instead sets the string shown in the "State ID" column.
At this point access to "special name" from jSMILE would require adding new native methods to the library, unless you can modify the .xdsl with XML processing tools externally.Any other ideas?
What platform are you using?
Re: Set the target state names with jsmile
As a point of reference, this was all necessitated because I found that the diagnostic tests recommended by Smile changed based on the alphabetical sort order of the fault names. Two models, both trained with the same learning data, behave differently. The model described by the 1st code code section (below) behaves differently from the model described in the 2nd (and the differences seen below are the only differences between the two .xdsl files).
I'm not a Beyes model expert at all, so I don't know if that's expected behavior or if it's a bug. It took me a while to determine that the sort order of the fault names affects the outcome probabilities and the diagnostic values of the tests. The sample model from which I was working (created using Genie and given to me by a colleague) just happened to have the faults named in such a way that they were were sorted alphabetically (in the diagnostic tree from which the model was created, and thus, in the .xdsl file). The model the Java code produces is created from an external source file, but it has the same structure and uses different names for all the nodes (which are not sorted alphabetically). The same learning data (adjusted for node names) is applied to both models.
Setting the fault name format to "user" and explicitly setting the names yields the desired behavior.
becomes this
Thanks for the help, btw
I'm not a Beyes model expert at all, so I don't know if that's expected behavior or if it's a bug. It took me a while to determine that the sort order of the fault names affects the outcome probabilities and the diagnostic values of the tests. The sample model from which I was working (created using Genie and given to me by a colleague) just happened to have the faults named in such a way that they were were sorted alphabetically (in the diagnostic tree from which the model was created, and thus, in the .xdsl file). The model the Java code produces is created from an external source file, but it has the same structure and uses different names for all the nodes (which are not sorted alphabetically). The same learning data (adjusted for node names) is applied to both models.
Setting the fault name format to "user" and explicitly setting the names yields the desired behavior.
That's exactly what I did - hacked together some code to transform the .xdsl file. Specifically, thisyou can modify the .xdsl with XML processing tools externally
Code: Select all
<genie version="1.0" app="GeNIe 2.0.4843.0" name="Unnamed" faultnameformat="nodestate">
<node id="Faults">
<name>Faults</name>
.
.
.
Code: Select all
<genie version="1.0" app="GeNIe 2.0.4843.0" name="Unnamed" faultnameformat="user">
<node id="Faults">
<name>Faults</name>
<state id="n28" faultname="s001_n28" />
<state id="n120" faultname="s002_n120" />
<state id="n116" faultname="s003_n116" />
<state id="n107" faultname="s004_n107" />
<state id="n104" faultname="s005_n104" />
<state id="n101" faultname="s006_n101" />
<state id="n97" faultname="s007_n97" />
<state id="n91" faultname="s008_n91" />
<state id="n94" faultname="s009_n94" />
.
.
.
Using Java 1.6 64-bit and Windows 7 64-bit. Is that what you mean by platform?What platform are you using?
Thanks for the help, btw
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: Set the target state names with jsmile
The only reason I can think of would be the case of GeNIe's diagnostic window displaying list of faults and encountering identical fault posteriors. In such case the "special name" would be used (if node fault format would be set to "user defined"). Note that the order of faults returned from jSMILE's DiagNetwork.update does not depend on the textual information; when probabilities are tied, the outcome index is used.raywonqa wrote:As a point of reference, this was all necessitated because I found that the diagnostic tests recommended by Smile changed based on the alphabetical sort order of the fault names. Two models, both trained with the same learning data, behave differently. The model described by the 1st code code section (below) behaves differently from the model described in the 2nd (and the differences seen below are the only differences between the two .xdsl files).
Yes, that's the info. I think we could consider adding the required functionality and creating an early private jSMILE build.Using Java 1.6 64-bit and Windows 7 64-bit. Is that what you mean by platform?
Re: Set the target state names with jsmile
That would be awesome. Let me know if you end up creating an early build with that capability.
Thanks!
Thanks!