mirror of
https://github.com/dgirardeau/q3DMASC.git
synced 2026-08-29 08:34:48 +08:00
Changes following PR
This commit is contained in:
@@ -299,3 +299,8 @@ bool ConfusionMatrix::save(QString filePath)
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
float ConfusionMatrix::getOverallAccuracy()
|
||||
{
|
||||
return m_overallAccuracy;
|
||||
}
|
||||
|
||||
+2
-1
@@ -30,8 +30,8 @@ public:
|
||||
float computeOverallAccuracy(cv::Mat& matrix);
|
||||
void compute(const std::vector<ScalarType> &actual, const std::vector<ScalarType> &predicted);
|
||||
void setSessionRun(QString session, int run);
|
||||
float m_overallAccuracy;
|
||||
bool save(QString filePath);
|
||||
float getOverallAccuracy();
|
||||
|
||||
private:
|
||||
std::set<ScalarType> classes;
|
||||
@@ -40,4 +40,5 @@ private:
|
||||
cv::Mat confusionMatrix;
|
||||
cv::Mat precisionRecallF1Score;
|
||||
std::vector<ScalarType> class_numbers;
|
||||
float m_overallAccuracy;
|
||||
};
|
||||
|
||||
@@ -332,7 +332,7 @@ void Train3DMASCDialog::saveTraces(ConfusionMatrix *confusionMatrix)
|
||||
|
||||
// save the run number and the overall accuracy
|
||||
if (m_traceStream.device())
|
||||
m_traceStream << run << " " << confusionMatrix->m_overallAccuracy << Qt::endl;
|
||||
m_traceStream << run << " " << confusionMatrix->getOverallAccuracy() << Qt::endl;
|
||||
confusionMatrix->save(m_tracePath + "/" + "run_" + QString::number(run) + "_confusion_matrix.txt");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user