Skip to content

Commit

Permalink
Turned on regression coloring again.
Browse files Browse the repository at this point in the history
  • Loading branch information
olas committed Apr 2, 2013
1 parent e65bfe6 commit 9091663
Showing 1 changed file with 19 additions and 9 deletions.
Expand Up @@ -124,6 +124,10 @@ public void initialize(IProgressMonitor monitor) throws DSException {
String signaturesPath = getFileFromParameter(SIGNATURES_FILE_PARAMETER );
startHeight=Integer.parseInt(getParameters().get( SIGNATURES_MIN_HEIGHT ));
endHeight=Integer.parseInt(getParameters().get( SIGNATURES_MAX_HEIGHT ));
String infoma = getParameters().get( "isInformative" );
if (infoma!=null)
setInformative(Boolean.parseBoolean(getParameters().get( "isInformative" )));


//These are for regression
if ("false".equalsIgnoreCase(getParameters().get( "isClassification" ))){
Expand Down Expand Up @@ -318,18 +322,22 @@ else if (predIX==negIX){

}else{
//Regression
if (prediction>regrUpperThreshold && lowIsNegative)
match.setClassification( ITestResult.POSITIVE );
else if (prediction>regrUpperThreshold && !lowIsNegative)
match.setClassification( ITestResult.NEGATIVE );
else if (prediction<regrLowerThreshold && lowIsNegative)
match.setClassification( ITestResult.NEGATIVE );
else if (prediction<regrLowerThreshold && !lowIsNegative)
match.setClassification( ITestResult.POSITIVE);
if (isInformative())
match.setClassification( ITestResult.INFORMATIVE );
else{
if (prediction>regrUpperThreshold && lowIsNegative)
match.setClassification( ITestResult.POSITIVE );
else if (prediction>regrUpperThreshold && !lowIsNegative)
match.setClassification( ITestResult.NEGATIVE );
else if (prediction<regrLowerThreshold && lowIsNegative)
match.setClassification( ITestResult.NEGATIVE );
else if (prediction<regrLowerThreshold && !lowIsNegative)
match.setClassification( ITestResult.POSITIVE);
}

//Else, between the two, keep inconclusive
match.setName("Result: " + formatter.format(prediction));
return results;
// return results;
}


Expand Down Expand Up @@ -529,6 +537,8 @@ else if (prediction<regrLowerThreshold && !lowIsNegative)
match = new ScaledResultMatch("Result: "
+ formatter.format( prediction ),
ITestResult.INFORMATIVE);
results.clear();
results.add(match);

int result=ITestResult.INCONCLUSIVE;
if (regrLowerThreshold!=null && regrUpperThreshold!=null){
Expand Down

0 comments on commit 9091663

Please sign in to comment.