/** * resets the classifier, i.e., the best model, last known restart and iteration, etc. * * @see #m_BestModel * @see #m_LastIteration * @see #m_LastRestart */ @Override public void reset() { super.reset(); m_BestModel = null; m_LastIteration = -1; m_LastRestart = -1; m_LastRMSTrain = 1.0; m_LastRMSTest = 1.0; m_LastRMSTestOriginal = 1.0; m_LastRMS = 1.0; m_RMSTrain = 1.0; m_RMSTest = 1.0; m_RMSTestOriginal = 1.0; m_RMS = 1.0; m_AccTrain = 0.0; m_AccTestOriginal = 0.0; m_LastAccTrain = 0.0; // for logging m_LogEntries.clear(); m_LogEntries.addFilename("RMS", createFilename("-rms.csv")); m_LogEntries.addFilename("RMSTrain", createFilename("-rms_train.csv")); m_LogEntries.addFilename("RMSTest", createFilename("-rms_test.csv")); m_LogEntries.addFilename("RMSTestOriginal", createFilename("-rms_test-original.csv")); m_LogEntries.addFilename("AccTrain", createFilename("-acc_train.csv")); m_LogEntries.addFilename("AccTestOriginal", createFilename("-acc_test-original.csv")); m_LogEntries.addFilename("FlippedLabels", createFilename("-flipped.csv")); }
/** * logs some internal quality measures * * @param restart the restart * @param iteration the iteration * @throws Exception if something goes wrong */ protected void logQuality(int restart, int iteration) throws Exception { m_LogEntries.addValue("RMS", m_RMS); m_LogEntries.addValue("RMSTrain", m_RMSTrain); m_LogEntries.addValue("RMSTest", m_RMSTest); m_LogEntries.addValue("RMSTestOriginal", m_RMSTestOriginal); m_LogEntries.addValue("AccTrain", m_AccTrain); m_LogEntries.addValue("AccTestOriginal", m_AccTestOriginal); m_LogEntries.addValue("FlippedLabels", getFlippedLabels()); // store it if ((iteration == m_NumIterations - 1) && (!m_LogEntries.getValues("RMS").equals(""))) { m_LogEntries.write(); } }