ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1740314 - in /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval: EvaluationOfEventEventThymeRelations.java EvaluationOfEventTimeRelations.java
Date Thu, 21 Apr 2016 13:50:04 GMT
Author: clin
Date: Thu Apr 21 13:50:04 2016
New Revision: 1740314

URL: http://svn.apache.org/viewvc?rev=1740314&view=rev
Log:
Enable tuning the bias parameter for liblinear models. This is the system with New Sent Detector
that achieves 0.583F on clincial tempEval test set.
ET: In all, Best Recall= 0.628 Best Settings: grid_C_0.001953125_Bias_0.03125
EE: In all, Best Recall= 0.604 Best Settings: grid_C_0.0078125_Bias_0.5

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.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=1740314&r1=1740313&r2=1740314&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
Thu Apr 21 13:50:04 2016
@@ -375,7 +375,7 @@ EvaluationOfTemporalRelations_ImplBase{
 		}
 
 		//calculate class-wise weights:
-		String[] weightArray=new String[TemporalRelationExtractorAnnotator.category_frequency.size()*2+2];
+		String[] weightArray=new String[TemporalRelationExtractorAnnotator.category_frequency.size()*2+4];
 		int weight_idx = 0;
 		float baseFreq = TemporalRelationExtractorAnnotator.category_frequency.get(TemporalRelationExtractorAnnotator.NO_RELATION_CATEGORY);
 		for( Map.Entry<String, Integer> entry: TemporalRelationExtractorAnnotator.category_frequency.entrySet()){
@@ -388,6 +388,9 @@ EvaluationOfTemporalRelations_ImplBase{
 
 		weightArray[weight_idx*2] = "-c";
 		weightArray[weight_idx*2+1] = optArray[1];
+		weight_idx ++;
+		weightArray[weight_idx*2] = "-B";
+		weightArray[weight_idx*2+1] = optArray[3];
 		
 		JarClassifierBuilder.trainAndPackage(new File(directory,"event-event"), weightArray);//"-w2","12","-w3","102",//"-w1","29","-w3","12","-w4","80","-w5","228","-w6","79","-w7","49","-w8","157","-w9","553","-w10","384",//"-w1","29","-w3","12","-w4","79","-w5","255","-w6","75","-w7","50","-w8","144","-w9","544","-w10","384",//"-w1","25","-w3","9","-w4","79","-w5","267","-w6","89","-w7","60","-w8","152","-w9","615","-w10","404",//"-w1","0.2","-w3","15","-w4","4","-w5","64","-w6","24","-w7","29","-w9","70","-c",
optArray[1]);"-c", "0.05");//"0.08","-w3","3","-w4","17","-w5","20","-w6","16","-w7","10","-w8","6",
"-w9","45","-w10","30","-c", optArray[1]);//"-c", "0.05");//optArray);
 		//		JarClassifierBuilder.trainAndPackage(new File(directory,"event-event"), "-h","0","-c",
"1000");

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java?rev=1740314&r1=1740313&r2=1740314&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
Thu Apr 21 13:50:04 2016
@@ -371,7 +371,7 @@ EvaluationOfTemporalRelations_ImplBase{
 		}
 		
 		//calculate class-wise weights:
-		String[] weightArray=new String[TemporalRelationExtractorAnnotator.category_frequency.size()*2+2];
+		String[] weightArray=new String[TemporalRelationExtractorAnnotator.category_frequency.size()*2+4];
 		int weight_idx = 0;
 		float baseFreq = TemporalRelationExtractorAnnotator.category_frequency.get(TemporalRelationExtractorAnnotator.NO_RELATION_CATEGORY);
 		for( Map.Entry<String, Integer> entry: TemporalRelationExtractorAnnotator.category_frequency.entrySet()){
@@ -384,6 +384,9 @@ EvaluationOfTemporalRelations_ImplBase{
 
 		weightArray[weight_idx*2] = "-c";
 		weightArray[weight_idx*2+1] = optArray[1];
+		weight_idx ++;
+		weightArray[weight_idx*2] = "-B";
+		weightArray[weight_idx*2+1] = optArray[3];
 		//    HideOutput hider = new HideOutput();
 		JarClassifierBuilder.trainAndPackage(new File(directory,"event-time"), weightArray);//"-w3","2","-w4","19","-w5","13","-w6","22","-w7","96","-w8","18"//"-w3","2","-w4","19","-w5","13","-w6","22","-w7","96","-w8","18","-c",
optArray[1]);//"-w4","18","-w5","14","-w6","21","-w7","100","-w8","19","-c", optArray[1]);//"0.05");//"-h","0","-c",
"1000");//optArray);
 		//		JarClassifierBuilder.trainAndPackage(new File(directory,"event-event"), "-h","0","-c",
"1000");



Mime
View raw message