@@ -284,73 +284,17 @@ private CySubNetwork genNegativeExample(int size, List<CySubNetwork> positiveExa
284284 * Convenience method for training networks on positive *and* negative examples
285285 */
286286 public void train (List <CySubNetwork > positiveExamples , List <CySubNetwork > negativeExamples ) {
287- System .out .println ("Entered TRAIN" );
288-
289- for (FeatureSet feature : features ) {
290- for (String desc : feature .getDescriptions ()) {
291- System .out .println (desc );
292- }
293- }
294-
295287 List <Cluster > posExamples = new ArrayList <Cluster >(), negExamples = new ArrayList <Cluster >();
296288 for (CySubNetwork pos : positiveExamples ) {posExamples .add (new Cluster (features , pos )); }
297289 for (CySubNetwork neg : negativeExamples ) {negExamples .add (new Cluster (features , neg ));}
298290
299291 System .out .println ("Lists of pos and neg training examples created" );
300-
301- // System.out.println("TRAINING BINS ON POSITIVE COMPLEXES:");
292+
302293 posBayesGraph .trainBins (posExamples );
303- // for (FeatureSet feature : features) {
304- // List<String> statNames = feature.getDescriptions();
305- // Map<String, Statistic> statMap = feature.getStatisticMap();
306- // for (String statName : statNames) {
307- // Statistic stat = statMap.get(statName);
308- // Double min = stat.getRange().getMin();
309- // Double max = stat.getRange().getMax();
310- // System.out.println(statName + "\n\tMin: " + min + "\n\tMax: " + max);
311- // }
312- // }
313-
314- // System.out.println("TRAINING BINS ON NEGATIVE COMPLEXES:");
315294 negBayesGraph .trainBins (negExamples );
316- // for (FeatureSet feature : features) {
317- // List<String> statNames = feature.getDescriptions();
318- // Map<String, Statistic> statMap = feature.getStatisticMap();
319- // for (String statName : statNames) {
320- // Statistic stat = statMap.get(statName);
321- // Double min = stat.getRange().getMin();
322- // Double max = stat.getRange().getMax();
323- // System.out.println(statName + "\n\tMin: " + min + "\n\tMax: " + max);
324- // }
325- // }
326-
327- // System.out.println("TRAINING PROBABILITY - POSITIVE:");
328- posBayesGraph .trainOn (posExamples );
329- // Min/max stable
330- // for (FeatureSet feature : features) {
331- // List<String> statNames = feature.getDescriptions();
332- // Map<String, Statistic> statMap = feature.getStatisticMap();
333- // for (String statName : statNames) {
334- // Statistic stat = statMap.get(statName);
335- // Double min = stat.getRange().getMin();
336- // Double max = stat.getRange().getMax();
337- // System.out.println(statName + "\n\tMin: " + min + "\n\tMax: " + max);
338- // }
339- // }
340-
341- // System.out.println("TRAINING PROBABILITY - NEGATIVE:");
295+ posBayesGraph .trainOn (posExamples );
342296 negBayesGraph .trainOn (negExamples );
343- // Min/max stable
344- // for (FeatureSet feature : features) {
345- // List<String> statNames = feature.getDescriptions();
346- // Map<String, Statistic> statMap = feature.getStatisticMap();
347- // for (String statName : statNames) {
348- // Statistic stat = statMap.get(statName);
349- // Double min = stat.getRange().getMin();
350- // Double max = stat.getRange().getMax();
351- // System.out.println(statName + "\n\tMin: " + min + "\n\tMax: " + max);
352- // }
353- // }
297+
354298 System .out .println ("Model has finished training on " + negativeExamples .size () + " negative Examples." );
355299 }
356300
0 commit comments