ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1636656 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
Date Tue, 04 Nov 2014 17:26:47 GMT
Author: clin
Date: Tue Nov  4 17:26:47 2014
New Revision: 1636656

URL: http://svn.apache.org/r1636656
Log:
allow event-event evaluation script to only serialize test patients' xmis

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java?rev=1636656&r1=1636655&r2=1636656&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
Tue Nov  4 17:26:47 2014
@@ -169,7 +169,7 @@ EvaluationOfTemporalRelations_ImplBase{
 					options.getUseGoldAttributes(),
 					options.getKernelParams(),
 					params);
-			evaluation.prepareXMIsFor(patientSets);
+//			evaluation.prepareXMIsFor(patientSets);
 			if(options.getI2B2Output()!=null) evaluation.setI2B2Output(options.getI2B2Output() + "/temporal-relations/event-event");
 			List<Integer> training = trainItems;
 			List<Integer> testing = null;
@@ -181,6 +181,11 @@ EvaluationOfTemporalRelations_ImplBase{
 			}
 			//do closure on system, but not on gold, to calculate recall
 			evaluation.skipTrain = options.getSkipTrain();
+			if(evaluation.skipTrain && options.getTest()){
+				evaluation.prepareXMIsFor(testing);
+			}else{
+				evaluation.prepareXMIsFor(patientSets);
+			}
 			params.stats = evaluation.trainAndTest(training, testing);//training);//
 			//      System.err.println(options.getKernelParams() == null ? params : options.getKernelParams());
 			System.err.println("No closure on gold::Closure on System::Recall Mode");
@@ -371,11 +376,11 @@ EvaluationOfTemporalRelations_ImplBase{
 					GOLD_VIEW_NAME,
 					CAS.NAME_DEFAULT_SOFA
 					);
-			outf =  new File("target/eval/thyme/SystemError_eventEvent_recall_UMLSsingle_dev.txt");
+			outf =  new File("target/eval/thyme/SystemError_eventEvent_recall_test.txt");
 		}else if (!recallModeEvaluation && this.useClosure){
-			outf =  new File("target/eval/thyme/SystemError_eventEvent_precision_UMLSsingle_dev.txt");
+			outf =  new File("target/eval/thyme/SystemError_eventEvent_precision_test.txt");
 		}else{
-			outf =  new File("target/eval/thyme/SystemError_eventEvent_plain_UMLSsingle_dev.txt");
+			outf =  new File("target/eval/thyme/SystemError_eventEvent_plain_test.txt");
 		}
 
 		PrintWriter outDrop =null;



Mime
View raw message