Changeset 74 for trunk/CrossPare/src/de/ugoe/cs/cpdp
- Timestamp:
- 05/04/16 11:55:23 (9 years ago)
- Location:
- trunk/CrossPare/src/de/ugoe/cs/cpdp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/Runner.java
r69 r74 52 52 createConfig(threadPool, file.getAbsolutePath()); 53 53 } 54 else if (file.isDirectory() ) {54 else if (file.isDirectory() && file.listFiles()!=null ) { 55 55 for (File subfile : file.listFiles()) { 56 56 if (subfile.isFile()) { -
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataselection/MahalanobisOutlierRemoval.java
r64 r74 48 48 @Override 49 49 public void setParameter(String parameters) { 50 if (parameters != null && parameters != "") {50 if (parameters != null && parameters.isEmpty()) { 51 51 epsilon = Double.parseDouble(parameters); 52 52 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/loader/AbstractFolderLoader.java
r41 r74 53 53 final File dataDir = new File(path); 54 54 final SingleVersionLoader instancesLoader = getSingleLoader(); 55 55 if (dataDir.listFiles() == null) { 56 return versions; 57 } 56 58 for (File projectDir : dataDir.listFiles()) { 57 59 if (projectDir.isDirectory()) { 58 60 String projectName = projectDir.getName(); 59 for (File versionFile : projectDir.listFiles()) { 60 if (versionFile.isFile() && 61 instancesLoader.filenameFilter(versionFile.getName())) 62 { 63 String versionName = versionFile.getName(); 64 Instances data = instancesLoader.load(versionFile); 65 versions.add(new SoftwareVersion(projectName, versionName, data)); 61 if (projectDir.listFiles() != null) { 62 for (File versionFile : projectDir.listFiles()) { 63 if (versionFile.isFile() && 64 instancesLoader.filenameFilter(versionFile.getName())) 65 { 66 String versionName = versionFile.getName(); 67 Instances data = instancesLoader.load(versionFile); 68 versions.add(new SoftwareVersion(projectName, versionName, data)); 69 } 66 70 } 67 71 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/loader/DecentDataLoader.java
r41 r74 163 163 catch (FileNotFoundException e) { 164 164 Console.printerrln("File with path: " + arffLocation + " was not found."); 165 e.printStackTrace();165 throw new RuntimeException(e); 166 166 } 167 167 catch (IOException e) { 168 168 Console.printerrln("File with path: " + arffLocation + " cannot be read."); 169 e.printStackTrace();169 throw new RuntimeException(e); 170 170 } 171 171 … … 445 445 } 446 446 else { 447 447 Console.printerrln("Could not determine model type, file should end with either .etl or .eol"); 448 return null; 448 449 } 449 450 … … 453 454 Console.printerrln("Parse error occured..."); 454 455 for (ParseProblem problem : module.getParseProblems()) { 455 System.err.println(problem.toString());456 Console.printerrln(problem.toString()); 456 457 } 457 458 // System.exit(-1); -
trunk/CrossPare/src/de/ugoe/cs/cpdp/loader/DecentFolderLoader.java
r41 r74 64 64 * and searches for "model.decent" files. 65 65 */ 66 if (dataDir.listFiles() == null) { 67 return versions; 68 } 66 69 for (File projectDir : dataDir.listFiles()) { 67 70 if (projectDir.isDirectory()) { 68 71 projectName = projectDir.getName(); 69 for (File versionFile : projectDir.listFiles()) { 70 loadDataFromFile(versionFile, instancesLoader, projectName, versions); 72 if (projectDir.listFiles() != null) { 73 for (File versionFile : projectDir.listFiles()) { 74 loadDataFromFile(versionFile, instancesLoader, projectName, versions); 75 } 71 76 } 72 77 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaLASERTraining.java
r64 r74 110 110 boolean allEqual = true; 111 111 for( Integer index : closestToTrainingInstance ) { 112 if( label == Double.NaN) {112 if( Double.isNaN(label) ) { 113 113 label = traindata.get(closestToTrainingInstance.get(index)).classValue(); 114 114 } … … 129 129 boolean allEqual = true; 130 130 for( Integer index : closestInstances ) { 131 if( label == Double.NaN) {131 if( Double.isNaN(label) ) { 132 132 label = traindata.get(closestInstances.get(index)).classValue(); 133 133 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaLocalFQTraining.java
r41 r74 399 399 400 400 double[][] X = FMAP.getX(); 401 distmat = new double[0][0];402 System.gc();403 401 404 402 // quadtree payload generation -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaTraining.java
r42 r74 48 48 public void apply(Instances traindata) { 49 49 classifier = setupClassifier(); 50 if( classifier==null ) { 51 Console.printerr("classifier of WekaTraining is null"); 52 throw new RuntimeException("classifier of WekaTraining is null"); 53 } 50 54 PrintStream errStr = System.err; 51 55 System.setErr(new PrintStream(new NullOutputStream()));
Note: See TracChangeset
for help on using the changeset viewer.