for(BayesianEvent event: this.events) {
this.query.defineEventType(event, EventType.Hidden);
}
// define the base event
ParsedProbability prob = list.get(0);
if( prob.getBaseEvents().size()==0 ) {
return;
}
BayesianEvent be = this.getEvent( prob.getChildEvent().getLabel() );
this.classificationTarget = this.events.indexOf(be);
this.query.defineEventType(be, EventType.Outcome);
// define the given events
for(ParsedEvent parsedGiven: prob.getGivenEvents()) {
BayesianEvent given = this.getEvent( parsedGiven.getLabel() );
this.query.defineEventType(given, EventType.Evidence);
}
this.query.locateEventTypes();
// set the values
for(ParsedEvent parsedGiven: prob.getGivenEvents()) {
BayesianEvent event = this.getEvent( parsedGiven.getLabel() );
this.query.setEventValue(event, parseInt(parsedGiven.getValue()) );
}
this.query.setEventValue(be, parseInt(prob.getBaseEvents().get(0).getValue()) );
}