Sha256: 47f780a15c7dc25f31a24a8a69a795b9646760c9fae99b510d7451b37b9a827f
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
#ifndef AUC_INFO_H # define AUC_INFO_H #include <string> #include <sstream> #include <iostream> typedef unsigned int uint; using std::ostringstream; using std::string; using std::ostream; const string AUC_COLUMNS = "(experiment_id, rocs.column, auc, true_positives, false_positives, true_negatives, false_negatives)"; class auc_info { public: double auc; uint tp; uint fp; uint tn; uint fn; // Constructor auc_info(double area_under_curve = 0, uint true_positives = 0, uint false_positives = 0, uint true_negatives = 0, uint false_negatives = 0) : auc(area_under_curve), tp(true_positives), fp(false_positives), tn(true_negatives), fn(false_negatives) { } ~auc_info() { } // Convert to a portion of a SQL insertion (string) string to_s() const { ostringstream s; s << auc << ", " << tp << ", " << fp << ", " << tn << ", " << fn; return s.str(); } string entry(uint experiment_id, uint j) const { ostringstream s; s << '(' << experiment_id << ", " << j << ", " << to_s() << ')'; return s.str(); } }; // Probably not necessary. std::ostream& operator<<(std::ostream& out, const auc_info& rhs) { out << rhs.to_s(); return out; } #endif
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rocker-0.0.6 | ext/rocker/auc_info.h |