Changeset 36863 for gs3-extensions
- Timestamp:
- 2022-10-23T00:00:08+13:00 (18 months ago)
- Location:
- gs3-extensions/mars-src/trunk/src/java/org/greenstone/gsdl3/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/mars-src/trunk/src/java/org/greenstone/gsdl3/util/WekaDBWrapper.java
r36859 r36863 41 41 public class WekaDBWrapper 42 42 { 43 public final static double AV_SEGMENT_LENGTH_SECS = 6.0; 44 43 45 /** the query result, filled in by runQuery */ 44 46 protected Vector query_result_; … … 190 192 191 193 String matching_doc_id = m.group(1); 192 int matching_segment_offset = Integer.parseInt(m.group(2)); 193 194 int end_of_matching_segment_offset = Integer.parseInt(m.group(2)); 195 int matching_segment_offset = end_of_matching_segment_offset - (int)AV_SEGMENT_LENGTH_SECS; 196 194 197 if (matching_doc_id.equals(doc_id)) { 195 198 continue; -
gs3-extensions/mars-src/trunk/src/java/org/greenstone/gsdl3/util/WekaFindInstanceKNN.java
r36859 r36863 94 94 { 95 95 System.err.println("**** wekaFindInstnaceKNN::kNearestNeighbours() called with:"); 96 System.err.print( " ****doc_id_segment = " + doc_id_segment);97 System.err.print( " arousal_val = " + arousal_val);98 System.err.print( " valence_val = " + valence_val);99 System.err.println(" k_nearest_num = " + k_nearest_num);96 System.err.print( " doc_id_segment = " + doc_id_segment); 97 System.err.print( " arousal_val = " + arousal_val); 98 System.err.print( " valence_val = " + valence_val); 99 System.err.println(" k_nearest_num = " + k_nearest_num); 100 100 101 101 Instance sample_instance = new DenseInstance(3); … … 117 117 try { 118 118 nearest_instances = knn_.kNearestNeighbours(sample_instance, k_nearest_num); 119 System.err.println("**** nearest_instances len = " + nearest_instances.numInstances());119 System.err.println("**** Expanded to include instances that are equidistant, nearest_instances len = " + nearest_instances.numInstances()); 120 120 121 121 //printNearestKNN(sample_instance,nearest_instances, k_nearest_num);
Note:
See TracChangeset
for help on using the changeset viewer.