Skip to content

Commit

Permalink
correct labels for classification models
Browse files Browse the repository at this point in the history
  • Loading branch information
olas committed Jul 3, 2012
1 parent 303fcfa commit 0953108
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -109,7 +109,9 @@ public List<String> getRequiredParameters() {

if (getParameters().get("isClassification")!=null &&
getParameters().get("isClassification").equals("false")){
//Regression: TODO not handled yet...

ret.add( HIGH_PERCENTILE );
ret.add( LOW_PERCENTILE );

}

Expand Down Expand Up @@ -456,11 +458,11 @@ protected List<? extends ITestResult> doRunTest(ICDKMolecule cdkmol,
int negIX = classLabels.indexOf(negativeValue);
int predIX = classLabels.indexOf(predictedClassLabel);

if (predIX<=posIX){
if (predIX==posIX){
match.setClassification( ITestResult.POSITIVE );
match.setName("Result: Positive");
}
else if (predIX>=negIX){
else if (predIX==negIX){
match.setClassification( ITestResult.NEGATIVE );
match.setName("Result: Negative");
}
Expand Down

0 comments on commit 0953108

Please sign in to comment.