/** * Gets the names of each of the columns produced for a single run. This * method should really be static. * * @return an array containing the name of each column */ @Override public String[] getKeyNames() { String[] keyNames = m_SplitEvaluator.getKeyNames(); // Add in the names of our extra key fields String[] newKeyNames = new String[keyNames.length + 2]; newKeyNames[0] = DATASET_FIELD_NAME; newKeyNames[1] = RUN_FIELD_NAME; System.arraycopy(keyNames, 0, newKeyNames, 2, keyNames.length); return newKeyNames; }
/** * Gets the data types of each of the columns produced for a single run. This * method should really be static. * * @return an array containing objects of the type of each column. The objects * should be Strings, or Doubles. */ @Override public Object[] getKeyTypes() { Object[] keyTypes = m_SplitEvaluator.getKeyTypes(); // Add in the types of our extra fields Object[] newKeyTypes = new String[keyTypes.length + 2]; newKeyTypes[0] = new String(); newKeyTypes[1] = new String(); System.arraycopy(keyTypes, 0, newKeyTypes, 2, keyTypes.length); return newKeyTypes; }
/** * Gets the names of each of the columns produced for a single run. This * method should really be static. * * @return an array containing the name of each column */ @Override public String[] getResultNames() { String[] resultNames = m_SplitEvaluator.getResultNames(); // Add in the names of our extra Result fields String[] newResultNames = new String[resultNames.length + 1]; newResultNames[0] = TIMESTAMP_FIELD_NAME; System.arraycopy(resultNames, 0, newResultNames, 1, resultNames.length); return newResultNames; }
Object[] seKey = m_SplitEvaluator.getKey(); Object[] key = new Object[seKey.length + 3]; key[0] = Utils.backQuoteChars(m_Instances.relationName()); Instances test = runInstances.testCV(m_NumFolds, fold); try { Object[] seResults = m_SplitEvaluator.getResult(train, test); Object[] results = new Object[seResults.length + 1]; results[0] = getTimestamp(); resultName = Utils.removeSubstring(resultName, "weka.attributeSelection."); m_ZipDest.zipit(m_SplitEvaluator.getRawResultOutput(), resultName);
/** * Set the SplitEvaluator. * * @param newSplitEvaluator new SplitEvaluator to use. */ public void setSplitEvaluator(SplitEvaluator newSplitEvaluator) { m_SplitEvaluator = newSplitEvaluator; m_SplitEvaluator.setAdditionalMeasures(m_AdditionalMeasures); }
/** * Gets the keys for a specified run number. Different run numbers correspond * to different randomizations of the data. Keys produced should be sent to * the current ResultListener * * @param run the run number to get keys for. * @throws Exception if a problem occurs while getting the keys */ @Override public void doRunKeys(int run) throws Exception { if (m_Instances == null) { throw new Exception("No Instances set"); } // Add in some fields to the key like run and fold number, dataset name Object[] seKey = m_SplitEvaluator.getKey(); Object[] key = new Object[seKey.length + 3]; key[0] = Utils.backQuoteChars(m_Instances.relationName()); key[2] = "" + (((run - 1) % m_NumFolds) + 1); key[1] = "" + (((run - 1) / m_NumFolds) + 1); System.arraycopy(seKey, 0, key, 3, seKey.length); if (m_ResultListener.isResultRequired(this, key)) { try { m_ResultListener.acceptResult(this, key, null); } catch (Exception ex) { // Save the train and test datasets for debugging purposes? throw ex; } } }
/** * Gets the data types of each of the columns produced for a single run. This * method should really be static. * * @return an array containing objects of the type of each column. The objects * should be Strings, or Doubles. */ @Override public Object[] getResultTypes() { Object[] resultTypes = m_SplitEvaluator.getResultTypes(); // Add in the types of our extra Result fields Object[] newResultTypes = new Object[resultTypes.length + 1]; newResultTypes[0] = new Double(0); System.arraycopy(resultTypes, 0, newResultTypes, 1, resultTypes.length); return newResultTypes; }
Object[] seKey = m_SplitEvaluator.getKey(); Object[] key = new Object[seKey.length + 3]; key[0] = Utils.backQuoteChars(m_Instances.relationName()); Instances test = runInstances.testCV(m_NumFolds, fold); try { Object[] seResults = m_SplitEvaluator.getResult(train, test); Object[] results = new Object[seResults.length + 1]; results[0] = getTimestamp(); resultName = Utils.removeSubstring(resultName, "weka.attributeSelection."); m_ZipDest.zipit(m_SplitEvaluator.getRawResultOutput(), resultName);
/** * Set the SplitEvaluator. * * @param newSplitEvaluator new SplitEvaluator to use. */ public void setSplitEvaluator(SplitEvaluator newSplitEvaluator) { m_SplitEvaluator = newSplitEvaluator; m_SplitEvaluator.setAdditionalMeasures(m_AdditionalMeasures); }
/** * Gets the keys for a specified run number. Different run numbers correspond * to different randomizations of the data. Keys produced should be sent to * the current ResultListener * * @param run the run number to get keys for. * @throws Exception if a problem occurs while getting the keys */ @Override public void doRunKeys(int run) throws Exception { if (m_Instances == null) { throw new Exception("No Instances set"); } // Add in some fields to the key like run number, dataset name Object[] seKey = m_SplitEvaluator.getKey(); Object[] key = new Object[seKey.length + 2]; key[0] = Utils.backQuoteChars(m_Instances.relationName()); key[1] = "" + run; System.arraycopy(seKey, 0, key, 2, seKey.length); if (m_ResultListener.isResultRequired(this, key)) { try { m_ResultListener.acceptResult(this, key, null); } catch (Exception ex) { // Save the train and test datasets for debugging purposes? throw ex; } } }
/** * Gets the data types of each of the columns produced for a single run. This * method should really be static. * * @return an array containing objects of the type of each column. The objects * should be Strings, or Doubles. */ @Override public Object[] getResultTypes() { Object[] resultTypes = m_SplitEvaluator.getResultTypes(); // Add in the types of our extra Result fields Object[] newResultTypes = new Object[resultTypes.length + 1]; newResultTypes[0] = new Double(0); System.arraycopy(resultTypes, 0, newResultTypes, 1, resultTypes.length); return newResultTypes; }
Object[] seKey = m_SplitEvaluator.getKey(); Object[] key = new Object[seKey.length + 3]; key[0] = Utils.backQuoteChars(m_Instances.relationName()); Instances test = runInstances.testCV(m_NumFolds, fold); try { Object[] seResults = m_SplitEvaluator.getResult(train, test); Object[] results = new Object[seResults.length + 1]; results[0] = getTimestamp(); resultName = Utils.removeSubstring(resultName, "weka.attributeSelection."); m_ZipDest.zipit(m_SplitEvaluator.getRawResultOutput(), resultName);
/** * Set the SplitEvaluator. * * @param value new SplitEvaluator to use. */ public void setSplitEvaluator(SplitEvaluator value) { m_SplitEvaluator = value; m_SplitEvaluator.setAdditionalMeasures(m_AdditionalMeasures); }
/** * Gets the keys for a specified run number. Different run numbers correspond * to different randomizations of the data. Keys produced should be sent to * the current ResultListener * * @param run the run number to get keys for. * @throws Exception if a problem occurs while getting the keys */ @Override public void doRunKeys(int run) throws Exception { if (m_Instances == null) { throw new Exception("No Instances set"); } // Add in some fields to the key like run and fold number, dataset name Object[] seKey = m_SplitEvaluator.getKey(); Object[] key = new Object[seKey.length + 3]; key[0] = Utils.backQuoteChars(m_Instances.relationName()); key[2] = "" + (((run - 1) % m_NumFolds) + 1); key[1] = "" + (((run - 1) / m_NumFolds) + 1); System.arraycopy(seKey, 0, key, 3, seKey.length); if (m_ResultListener.isResultRequired(this, key)) { try { m_ResultListener.acceptResult(this, key, null); } catch (Exception ex) { // Save the train and test datasets for debugging purposes? throw ex; } } }
/** * Gets the names of each of the columns produced for a single run. This * method should really be static. * * @return an array containing the name of each column */ @Override public String[] getResultNames() { String[] resultNames = m_SplitEvaluator.getResultNames(); // Add in the names of our extra Result fields String[] newResultNames = new String[resultNames.length + 1]; newResultNames[0] = TIMESTAMP_FIELD_NAME; System.arraycopy(resultNames, 0, newResultNames, 1, resultNames.length); return newResultNames; }
/** * Gets the names of each of the columns produced for a single run. This * method should really be static. * * @return an array containing the name of each column */ @Override public String[] getKeyNames() { String[] keyNames = m_SplitEvaluator.getKeyNames(); // Add in the names of our extra key fields String[] newKeyNames = new String[keyNames.length + 2]; newKeyNames[0] = DATASET_FIELD_NAME; newKeyNames[1] = RUN_FIELD_NAME; System.arraycopy(keyNames, 0, newKeyNames, 2, keyNames.length); return newKeyNames; }
/** * Gets the data types of each of the columns produced for a single run. This * method should really be static. * * @return an array containing objects of the type of each column. The objects * should be Strings, or Doubles. */ @Override public Object[] getResultTypes() { Object[] resultTypes = m_SplitEvaluator.getResultTypes(); // Add in the types of our extra Result fields Object[] newResultTypes = new Object[resultTypes.length + 1]; newResultTypes[0] = new Double(0); System.arraycopy(resultTypes, 0, newResultTypes, 1, resultTypes.length); return newResultTypes; }
/** * Gets the data types of each of the columns produced for a single run. This * method should really be static. * * @return an array containing objects of the type of each column. The objects * should be Strings, or Doubles. */ @Override public Object[] getKeyTypes() { Object[] keyTypes = m_SplitEvaluator.getKeyTypes(); // Add in the types of our extra fields Object[] newKeyTypes = new String[keyTypes.length + 2]; newKeyTypes[0] = new String(); newKeyTypes[1] = new String(); System.arraycopy(keyTypes, 0, newKeyTypes, 2, keyTypes.length); return newKeyTypes; }
Object[] seKey = m_SplitEvaluator.getKey(); Object[] key = new Object[seKey.length + 3]; key[0] = Utils.backQuoteChars(m_Instances.relationName()); Instances test = runInstances.testCV(m_NumFolds, fold); try { Object[] seResults = m_SplitEvaluator.getResult(train, test); Object[] results = new Object[seResults.length + 1]; results[0] = getTimestamp(); resultName = Utils.removeSubstring(resultName, "weka.attributeSelection."); m_ZipDest.zipit(m_SplitEvaluator.getRawResultOutput(), resultName);
/** * Set the SplitEvaluator. * * @param newSplitEvaluator new SplitEvaluator to use. */ public void setSplitEvaluator(SplitEvaluator newSplitEvaluator) { m_SplitEvaluator = newSplitEvaluator; m_SplitEvaluator.setAdditionalMeasures(m_AdditionalMeasures); }