Hello,
is it possible to execute the diagnosis tool using Jsmile?
I want to access the name of the best ranked test by Jsmile.
best regards
Samoht
execute Diagnosis tool by Jsmile
Re: execute Diagnosis tool by Jsmile
Yes, just use DiagNetwork class.
Re: execute Diagnosis tool by Jsmile
Hi,
in http://genie.sis.pitt.edu/wiki/JSMILE:_ObservationInfo
there are the following methods described:
similar not to find in the class FaultInfo:
double getProbability()
void setProbability(double probability)
samoht
in http://genie.sis.pitt.edu/wiki/JSMILE:_ObservationInfo
there are the following methods described:
- double getEntropy()
void setEntropy(double entropy)
double getCost()
void setCost(double cost)
double getInfoGain()
void setInfoGain(double infoGain)
similar not to find in the class FaultInfo:
double getProbability()
void setProbability(double probability)
samoht
Re: execute Diagnosis tool by Jsmile
Hi,
I really dont know how to get infoGain for the best ranked (highest diagnostic value) test via Jsmile.
Does anybody have a code sample?
I really appreciate any help!
samoht
I really dont know how to get infoGain for the best ranked (highest diagnostic value) test via Jsmile.
Does anybody have a code sample?
I really appreciate any help!
samoht
Re: execute Diagnosis tool by Jsmile
These are really Java basics. Just use observationInfo.infoGain to access individual fields.samoht wrote:But the class ObservationInfo show me in Eclipse only the public fields for cost,, entropy and infoGain but NO getEntropy() Method and so on.
You should call update() on your DiagNetwork object. For example:And how can I access ObservationInfo from my DiagNetwork anyway?
diagNet.setPursuedFault(diagNet.findMostLikelyFault());
DiagResult results = diagNet.update();
// results.faults[0].probability
Good luck
Re: execute Diagnosis tool by Jsmile
Hi many thanks for your relply.
yes its Java basics, but its nevertheless strange that in the Jsmile-Api-documentation are setters and getters mentioned which dont exist.
But another question: How can I set the entropy-cost-ratio? (as I do manually by moving the slider).
Can I do like this:
DiagResults diagResults = diagNet.update();
diagResults.observations[0].entropy = <entropy>;
diagResults.observations[0].cost = <cost>;
But I just want to determine thé ratio not the values for cost and entropy .
eAnd Do I have to call then again:
DiagResults diagResults = diagNet.update();
to get the infogain-value fitting to the entropy-cost-ratio with
infogain = diagResults.observations[0].infofgain ?
Another question:
Do i have to call both:
diagNet.update(); and
net.updateBeliefs(); ?
regards
samoht
yes its Java basics, but its nevertheless strange that in the Jsmile-Api-documentation are setters and getters mentioned which dont exist.
But another question: How can I set the entropy-cost-ratio? (as I do manually by moving the slider).
Can I do like this:
DiagResults diagResults = diagNet.update();
diagResults.observations[0].entropy = <entropy>;
diagResults.observations[0].cost = <cost>;
But I just want to determine thé ratio not the values for cost and entropy .
eAnd Do I have to call then again:
DiagResults diagResults = diagNet.update();
to get the infogain-value fitting to the entropy-cost-ratio with
infogain = diagResults.observations[0].infofgain ?
Another question:
Do i have to call both:
diagNet.update(); and
net.updateBeliefs(); ?
regards
samoht
-
- Site Admin
- Posts: 1441
- Joined: Mon Nov 26, 2007 5:51 pm
Re: execute Diagnosis tool by Jsmile
The C++ methods for setting/getting the entropy/cost ratio are not exposed through jSMILE. However, they're internally setting the user property named DIAG_alphaValue on the network object (and this is not likely to change soon). Effectively, you can work around the lack of explicit jSMILE functionality related to entropy/cost ration with Network.getUserProperties and Network.setUserProperties. Note that this is stored in Network, not DiagNetwork. The ratio is read from the Network object when DiagNetwork is created.samoht wrote:But another question: How can I set the entropy-cost-ratio? (as I do manually by moving the slider).
Can I do like this:
DiagResults diagResults = diagNet.update();
diagResults.observations[0].entropy = <entropy>;
diagResults.observations[0].cost = <cost>;
No, the DiagNetwork.update does all the work.Another question:
Do i have to call both:
diagNet.update(); and
net.updateBeliefs();