The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to get confidences of predictions in JAVA code
Greetings,
I made my RM plugin which works with predictions. I read predicted and true values as:
Thanks in advance.
I made my RM plugin which works with predictions. I read predicted and true values as:
How can I read confidences of predicted binominal values?
ExampleSet exampleSet = getInput(ExampleSet.class);
Iterator<Example> reader = exampleSet.iterator();
while (reader.hasNext()) {
Example example = reader.next();
DataRow row = example.getDataRow();
boolean trueGain = !(row
.get(example.getAttributes().getLabel()) > 0.0);
boolean predictedGain = !(row.get(example.getAttributes()
.getPredictedLabel()) > 0.0);
....
double confidenceTrue = ????
double confidenceFalse = ????
}
Thanks in advance.
Tagged:
0
Answers
check out this method: In general it is recommended to iterate over the examples instead over the DataRows. Since the ExampleSet stores (roughly said) transformations of attributes and filters, you really shouldnt iterate over the underlying datatable represented by DataRows.
If you want to get the name of the confidence Attribute, use: Now you can retrieve the Attribute (if available)... and retrieve the value of the current example Very long explanation, hope it was helpful though
regards,
Steffen
PS: "classValue" and "targetValue" mean the same, a value of the set of possible values of your label attribute.
Thank you very much Steffen.