Changeset 99 for trunk/CrossPare/src/de/ugoe/cs/cpdp/training
- Timestamp:
- 05/13/16 13:16:05 (9 years ago)
- Location:
- trunk/CrossPare/src/de/ugoe/cs/cpdp/training
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaBaggingTraining.java
r86 r99 15 15 package de.ugoe.cs.cpdp.training; 16 16 17 import java.io.PrintStream;18 17 import java.util.HashSet; 19 18 import java.util.LinkedList; … … 22 21 23 22 import org.apache.commons.collections4.list.SetUniqueList; 24 import org.apache.commons.io.output.NullOutputStream;25 23 26 24 import weka.classifiers.AbstractClassifier; … … 60 58 @Override 61 59 public void apply(SetUniqueList<Instances> traindataSet) { 62 PrintStream errStr = System.err;63 System.setErr(new PrintStream(new NullOutputStream()));64 60 try { 65 61 classifier.buildClassifier(traindataSet); … … 67 63 catch (Exception e) { 68 64 throw new RuntimeException(e); 69 }70 finally {71 System.setErr(errStr);72 65 } 73 66 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaLocalEMTraining.java
r86 r99 15 15 package de.ugoe.cs.cpdp.training; 16 16 17 import java.io.PrintStream;18 17 import java.util.HashMap; 19 18 import java.util.HashSet; … … 22 21 import java.util.Set; 23 22 import java.util.logging.Level; 24 25 import org.apache.commons.io.output.NullOutputStream;26 23 27 24 import de.ugoe.cs.util.console.Console; … … 59 56 @Override 60 57 public void apply(Instances traindata) { 61 PrintStream errStr = System.err;62 System.setErr(new PrintStream(new NullOutputStream()));63 58 try { 64 59 classifier.buildClassifier(traindata); … … 66 61 catch (Exception e) { 67 62 throw new RuntimeException(e); 68 }69 finally {70 System.setErr(errStr);71 63 } 72 64 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaLocalFQTraining.java
r86 r99 15 15 package de.ugoe.cs.cpdp.training; 16 16 17 import java.io.PrintStream;18 17 import java.util.ArrayList; 19 18 import java.util.HashMap; … … 23 22 import java.util.Set; 24 23 import java.util.logging.Level; 25 26 import org.apache.commons.io.output.NullOutputStream;27 24 28 25 import de.ugoe.cs.cpdp.training.QuadTree; … … 66 63 @Override 67 64 public void apply(Instances traindata) { 68 PrintStream errStr = System.err;69 System.setErr(new PrintStream(new NullOutputStream()));70 65 try { 71 66 classifier.buildClassifier(traindata); … … 73 68 catch (Exception e) { 74 69 throw new RuntimeException(e); 75 }76 finally {77 System.setErr(errStr);78 70 } 79 71 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaTestAwareTraining.java
r86 r99 15 15 package de.ugoe.cs.cpdp.training; 16 16 17 import java.io.PrintStream;18 17 import java.util.logging.Level; 19 20 import org.apache.commons.io.output.NullOutputStream;21 18 22 19 import de.ugoe.cs.cpdp.wekaclassifier.ITestAwareClassifier; … … 35 32 } 36 33 ((ITestAwareClassifier) classifier).setTestdata(testdata); 37 PrintStream errStr = System.err;38 System.setErr(new PrintStream(new NullOutputStream()));39 34 try { 40 35 if (classifier == null) { … … 60 55 } 61 56 } 62 finally {63 System.setErr(errStr);64 }65 57 } 66 58 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaTraining.java
r86 r99 15 15 package de.ugoe.cs.cpdp.training; 16 16 17 import java.io.PrintStream;18 17 import java.util.logging.Level; 19 20 import org.apache.commons.io.output.NullOutputStream;21 18 22 19 import de.ugoe.cs.util.console.Console; … … 52 49 throw new RuntimeException("classifier of WekaTraining is null"); 53 50 } 54 PrintStream errStr = System.err;55 System.setErr(new PrintStream(new NullOutputStream()));56 51 try { 57 52 if (classifier == null) { … … 77 72 } 78 73 } 79 finally {80 System.setErr(errStr);81 }82 74 } 83 75 }
Note: See TracChangeset
for help on using the changeset viewer.