/** * Gets the current settings of the C45Saver object. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); if (retrieveFile() != null) { options.add("-o"); options.add("" + retrieveFile()); } else { options.add("-o"); options.add(""); } if (getInstances() != null) { options.add("-i"); options.add("" + getInstances().relationName()); options.add("-c"); options.add("" + getInstances().classIndex()); } else { options.add("-i"); options.add(""); options.add("-c"); options.add(""); } Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
/** * Gets the current settings of the C45Saver object. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); if (retrieveFile() != null) { options.add("-o"); options.add("" + retrieveFile()); } else { options.add("-o"); options.add(""); } if (getInstances() != null) { options.add("-i"); options.add("" + getInstances().relationName()); options.add("-c"); options.add("" + getInstances().classIndex()); } else { options.add("-i"); options.add(""); options.add("-c"); options.add(""); } Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
throw new IOException("Batch and incremental saving cannot be mixed."); if (retrieveFile() == null || getWriter() == null) { throw new IOException( "C4.5 format requires two files. Therefore no output to standard out can be generated.\nPlease specifiy output files using the -o option."); String out = retrieveFile().getAbsolutePath(); setFileExtension(".data"); out = out.substring(0, out.lastIndexOf('.')) + getFileExtension(); "Cannot create data file, only names file created."); if (retrieveFile() == null || getWriter() == null) { throw new IOException( "Cannot create data file, only names file created.");
if (retrieveFile() == null || getWriter() == null) { throw new IOException( "C4.5 format requires two files. Therefore no output to standard out can be generated.\nPlease specifiy output files using the -o option."); String out = retrieveFile().getAbsolutePath(); setFileExtension(".data"); out = out.substring(0, out.lastIndexOf('.')) + getFileExtension(); + ex.toString() + ")."); if (retrieveFile() == null || getWriter() == null) { throw new IOException("Cannot create data file, only names file created.");
if (retrieveFile() == null || getWriter() == null) { throw new IOException( "C4.5 format requires two files. Therefore no output to standard out can be generated.\nPlease specifiy output files using the -o option."); String out = retrieveFile().getAbsolutePath(); setFileExtension(".data"); out = out.substring(0, out.lastIndexOf('.')) + getFileExtension(); + ex.toString() + ")."); if (retrieveFile() == null || getWriter() == null) { throw new IOException("Cannot create data file, only names file created.");
throw new IOException("Batch and incremental saving cannot be mixed."); if (retrieveFile() == null || getWriter() == null) { throw new IOException( "C4.5 format requires two files. Therefore no output to standard out can be generated.\nPlease specifiy output files using the -o option."); String out = retrieveFile().getAbsolutePath(); setFileExtension(".data"); out = out.substring(0, out.lastIndexOf('.')) + getFileExtension(); "Cannot create data file, only names file created."); if (retrieveFile() == null || getWriter() == null) { throw new IOException( "Cannot create data file, only names file created.");