Commit 05f5d845 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[status] use more generic term label

parent bfec63fa
...@@ -137,11 +137,11 @@ public: ...@@ -137,11 +137,11 @@ public:
/*! /*!
* \brief Increase counter of rejected samples * \brief Increase counter of rejected samples
* with a specific rejection reason. * with a specific rejection label.
*/ */
void increaseRejectedCounter(const std::string& reason) void increaseRejectedCounter(const std::string& label)
{ {
rejectedCount_[reason]++; rejectedCount_[label]++;
} }
/*! /*!
...@@ -174,16 +174,16 @@ public: ...@@ -174,16 +174,16 @@ public:
return std::accumulate(data.begin(), return std::accumulate(data.begin(),
data.end(), data.end(),
0, 0,
[] (const auto& curCount, const auto& reasonCountPair) [] (const auto& curCount, const auto& labelCountPair)
{ return curCount + reasonCountPair.second; }); { return curCount + labelCountPair.second; });
} }
/*! /*!
* \brief Returns the rejected entity count for a specific reason. * \brief Returns the rejected entity count for a specific label.
*/ */
std::size_t getRejectedCount(const std::string& reason) const std::size_t getRejectedCount(const std::string& label) const
{ {
auto it = rejectedCount_.find(reason); auto it = rejectedCount_.find(label);
return it != rejectedCount_.end() ? it->second : 0; return it != rejectedCount_.end() ? it->second : 0;
} }
...@@ -195,11 +195,11 @@ public: ...@@ -195,11 +195,11 @@ public:
auto result = rejectedCount_; auto result = rejectedCount_;
if (unspecifiedRejectedCount_ > 0) if (unspecifiedRejectedCount_ > 0)
{ {
if (result.find("unspecified") != result.end()) if (result.find("unlabeled") != result.end())
{ {
std::cout << "WARNING:\n" std::cout << "WARNING:\n"
<< "Rejection reason \"unspecified\" registered, " << "Rejection label \"unlabeled\" registered, "
<< "as well as rejection events without reason.\n" << "as well as rejection events without label.\n"
<< "These two counters will be added.\n"; << "These two counters will be added.\n";
result["unlabeled"] += unspecifiedRejectedCount_; result["unlabeled"] += unspecifiedRejectedCount_;
} }
...@@ -260,14 +260,14 @@ public: ...@@ -260,14 +260,14 @@ public:
{ {
std::size_t sumRejected = 0; std::size_t sumRejected = 0;
const auto data = getRejectionData(); const auto data = getRejectionData();
for (const auto& [reason, count] : data) for (const auto& [label, count] : data)
sumRejected += count; sumRejected += count;
std::cout << "Number of registered rejections: " << sumRejected << std::endl; std::cout << "Number of registered rejections: " << sumRejected << std::endl;
for (const auto& [reason, count] : data) for (const auto& [label, count] : data)
std::cout << "\t-" << reason << ": " << count << " / " std::cout << "\t-" << label << ": " << count << " / "
<< std::setprecision(2) << std::fixed << std::setprecision(2) << std::fixed
<< 100.0*count/sumRejected << " %" << std::endl; << 100.0*count/sumRejected << " %" << std::endl;
} }
private: private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment