if (getRawOutput()) { result.add("-D"); if (!getRandomizeData()) { result.add("-R"); result.add(getOutputFile().getName()); result.add(getTestsetDir().getPath()); if (getTestsetPrefix().length() > 0) { result.add("-prefix"); result.add(getTestsetPrefix()); result.add(getTestsetSuffix()); if (getRelationFind().length() > 0) { result.add("-find"); result.add(getRelationFind()); if (getRelationReplace().length() > 0) { result.add("-replace"); result.add(getRelationReplace()); if (getSplitEvaluator() != null) { result.add("-W"); result.add(getSplitEvaluator().getClass().getName());
if (getRandomizeData()) { result += " -R"; result += " -dir " + getTestsetDir(); if (getTestsetPrefix().length() > 0) { result += " -prefix " + getTestsetPrefix(); result += " -suffix " + getTestsetSuffix(); if (getRelationFind().length() > 0) { result += " -find " + getRelationFind(); if (getRelationReplace().length() > 0) { result += " -replace " + getRelationReplace();
setRawOutput(Utils.getFlag('D', options)); setRandomizeData(!Utils.getFlag('R', options)); setOutputFile(new File(tmpStr)); setTestsetDir(new File(tmpStr)); } else { setTestsetDir(new File(System.getProperty("user.dir"))); setTestsetPrefix(tmpStr); } else { setTestsetPrefix(""); setTestsetSuffix(tmpStr); } else { setTestsetSuffix(DEFAULT_SUFFIX); setRelationFind(tmpStr); } else { setRelationFind(""); if ((tmpStr.length() > 0) && (getRelationFind().length() > 0)) { setRelationReplace(tmpStr); } else { setRelationReplace(""); setSplitEvaluator((SplitEvaluator) Utils.forName(SplitEvaluator.class, tmpStr, null)); if (getSplitEvaluator() instanceof OptionHandler) {
if (getRawOutput()) { if (m_ZipDest == null) { m_ZipDest = new OutputZipper(m_OutputFile); String filename = createFilename(train); File file = new File(filename); if (!file.exists()) { Object[] seResults = m_SplitEvaluator.getResult(train, test); Object[] results = new Object[seResults.length + 1]; results[0] = getTimestamp(); System.arraycopy(seResults, 0, results, 1, seResults.length); if (m_debugOutput) {
/** * Gets a text descrption of the result producer. * * @return a text description of the result producer. */ @Override public String toString() { String result = "ExplicitTestsetResultProducer: "; result += getCompatibilityState(); if (m_Instances == null) { result += ": <null Instances>"; } else { result += ": " + Utils.backQuoteChars(m_Instances.relationName()); } return result; }
setRawOutput(Utils.getFlag('D', options)); setRandomizeData(!Utils.getFlag('R', options)); setOutputFile(new File(tmpStr)); setTestsetDir(new File(tmpStr)); } else { setTestsetDir(new File(System.getProperty("user.dir"))); setTestsetPrefix(tmpStr); } else { setTestsetPrefix(""); setTestsetSuffix(tmpStr); } else { setTestsetSuffix(DEFAULT_SUFFIX); setRelationFind(tmpStr); } else { setRelationFind(""); if ((tmpStr.length() > 0) && (getRelationFind().length() > 0)) { setRelationReplace(tmpStr); } else { setRelationReplace(""); setSplitEvaluator((SplitEvaluator) Utils.forName(SplitEvaluator.class, tmpStr, null)); if (getSplitEvaluator() instanceof OptionHandler) {
if (getRandomizeData()) { result += " -R"; result += " -dir " + getTestsetDir(); if (getTestsetPrefix().length() > 0) { result += " -prefix " + getTestsetPrefix(); result += " -suffix " + getTestsetSuffix(); if (getRelationFind().length() > 0) { result += " -find " + getRelationFind(); if (getRelationReplace().length() > 0) { result += " -replace " + getRelationReplace();
if (getRawOutput()) { if (m_ZipDest == null) { m_ZipDest = new OutputZipper(m_OutputFile); String filename = createFilename(train); File file = new File(filename); if (!file.exists()) { Object[] seResults = m_SplitEvaluator.getResult(train, test); Object[] results = new Object[seResults.length + 1]; results[0] = getTimestamp(); System.arraycopy(seResults, 0, results, 1, seResults.length); if (m_debugOutput) {
/** * Gets a text descrption of the result producer. * * @return a text description of the result producer. */ @Override public String toString() { String result = "ExplicitTestsetResultProducer: "; result += getCompatibilityState(); if (m_Instances == null) { result += ": <null Instances>"; } else { result += ": " + Utils.backQuoteChars(m_Instances.relationName()); } return result; }
if (getRawOutput()) { result.add("-D"); if (!getRandomizeData()) { result.add("-R"); result.add(getOutputFile().getName()); result.add(getTestsetDir().getPath()); if (getTestsetPrefix().length() > 0) { result.add("-prefix"); result.add(getTestsetPrefix()); result.add(getTestsetSuffix()); if (getRelationFind().length() > 0) { result.add("-find"); result.add(getRelationFind()); if (getRelationReplace().length() > 0) { result.add("-replace"); result.add(getRelationReplace()); if (getSplitEvaluator() != null) { result.add("-W"); result.add(getSplitEvaluator().getClass().getName());
/** * Generates a new filename for the given relation based on the current setup. * * @param inst the instances to create the filename for * @return the generated filename */ protected String createFilename(Instances inst) { String result; String name; name = inst.relationName(); if (getRelationFind().length() > 0) { name = name.replaceAll(getRelationFind(), getRelationReplace()); } result = getTestsetDir().getPath() + File.separator; result += getTestsetPrefix() + name + getTestsetSuffix(); // substitute the run number (and any other variables) // if specified try { result = m_env.substitute(result); } catch (Exception ex) { } return result; }
/** * Generates a new filename for the given relation based on the current setup. * * @param inst the instances to create the filename for * @return the generated filename */ protected String createFilename(Instances inst) { String result; String name; name = inst.relationName(); if (getRelationFind().length() > 0) { name = name.replaceAll(getRelationFind(), getRelationReplace()); } result = getTestsetDir().getPath() + File.separator; result += getTestsetPrefix() + name + getTestsetSuffix(); // substitute the run number (and any other variables) // if specified try { result = m_env.substitute(result); } catch (Exception ex) { } return result; }