30 #ifndef GOOGLE_BIGQUERY_API_BINARY_CONFUSION_MATRIX_H_ 31 #define GOOGLE_BIGQUERY_API_BINARY_CONFUSION_MATRIX_H_ 33 #include "googleapis/base/integral_types.h" 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 84 return StringPiece(
"google_bigquery_api::BinaryConfusionMatrix");
93 return Storage().isMember(
"accuracy");
100 MutableStorage()->removeMember(
"accuracy");
108 const Json::Value& storage = Storage(
"accuracy");
109 return client::JsonValueToCppValueHelper<double >(storage);
120 client::SetJsonValueFromCppValueHelper<double >(
121 value, MutableStorage(
"accuracy"));
130 return Storage().isMember(
"f1Score");
137 MutableStorage()->removeMember(
"f1Score");
145 const Json::Value& storage = Storage(
"f1Score");
146 return client::JsonValueToCppValueHelper<double >(storage);
157 client::SetJsonValueFromCppValueHelper<double >(
158 value, MutableStorage(
"f1Score"));
167 return Storage().isMember(
"falseNegatives");
174 MutableStorage()->removeMember(
"falseNegatives");
182 const Json::Value& storage = Storage(
"falseNegatives");
183 return client::JsonValueToCppValueHelper<int64 >(storage);
194 client::SetJsonValueFromCppValueHelper<int64 >(
195 value, MutableStorage(
"falseNegatives"));
204 return Storage().isMember(
"falsePositives");
211 MutableStorage()->removeMember(
"falsePositives");
219 const Json::Value& storage = Storage(
"falsePositives");
220 return client::JsonValueToCppValueHelper<int64 >(storage);
231 client::SetJsonValueFromCppValueHelper<int64 >(
232 value, MutableStorage(
"falsePositives"));
242 return Storage().isMember(
"positiveClassThreshold");
249 MutableStorage()->removeMember(
"positiveClassThreshold");
257 const Json::Value& storage = Storage(
"positiveClassThreshold");
258 return client::JsonValueToCppValueHelper<double >(storage);
269 client::SetJsonValueFromCppValueHelper<double >(
270 value, MutableStorage(
"positiveClassThreshold"));
279 return Storage().isMember(
"precision");
286 MutableStorage()->removeMember(
"precision");
294 const Json::Value& storage = Storage(
"precision");
295 return client::JsonValueToCppValueHelper<double >(storage);
307 client::SetJsonValueFromCppValueHelper<double >(
308 value, MutableStorage(
"precision"));
317 return Storage().isMember(
"recall");
324 MutableStorage()->removeMember(
"recall");
332 const Json::Value& storage = Storage(
"recall");
333 return client::JsonValueToCppValueHelper<double >(storage);
345 client::SetJsonValueFromCppValueHelper<double >(
346 value, MutableStorage(
"recall"));
355 return Storage().isMember(
"trueNegatives");
362 MutableStorage()->removeMember(
"trueNegatives");
370 const Json::Value& storage = Storage(
"trueNegatives");
371 return client::JsonValueToCppValueHelper<int64 >(storage);
382 client::SetJsonValueFromCppValueHelper<int64 >(
383 value, MutableStorage(
"trueNegatives"));
392 return Storage().isMember(
"truePositives");
399 MutableStorage()->removeMember(
"truePositives");
407 const Json::Value& storage = Storage(
"truePositives");
408 return client::JsonValueToCppValueHelper<int64 >(storage);
419 client::SetJsonValueFromCppValueHelper<int64 >(
420 value, MutableStorage(
"truePositives"));
427 #endif // GOOGLE_BIGQUERY_API_BINARY_CONFUSION_MATRIX_H_ const StringPiece GetTypeName() const
Definition: binary_confusion_matrix.h:83
void set_true_negatives(int64 value)
Definition: binary_confusion_matrix.h:381
void clear_accuracy()
Definition: binary_confusion_matrix.h:99
double get_positive_class_threshold() const
Definition: binary_confusion_matrix.h:256
void clear_recall()
Definition: binary_confusion_matrix.h:323
void clear_true_negatives()
Definition: binary_confusion_matrix.h:361
int64 get_false_negatives() const
Definition: binary_confusion_matrix.h:181
bool has_recall() const
Definition: binary_confusion_matrix.h:316
int64 get_true_positives() const
Definition: binary_confusion_matrix.h:406
double get_recall() const
Definition: binary_confusion_matrix.h:331
void clear_f1_score()
Definition: binary_confusion_matrix.h:136
bool has_true_negatives() const
Definition: binary_confusion_matrix.h:354
Definition: aggregate_classification_metrics.cc:39
void clear_positive_class_threshold()
Definition: binary_confusion_matrix.h:248
void clear_false_positives()
Definition: binary_confusion_matrix.h:210
void set_f1_score(double value)
Definition: binary_confusion_matrix.h:156
bool has_false_positives() const
Definition: binary_confusion_matrix.h:203
void set_positive_class_threshold(double value)
Definition: binary_confusion_matrix.h:268
Definition: binary_confusion_matrix.h:50
void clear_precision()
Definition: binary_confusion_matrix.h:285
void clear_true_positives()
Definition: binary_confusion_matrix.h:398
bool has_f1_score() const
Definition: binary_confusion_matrix.h:129
int64 get_true_negatives() const
Definition: binary_confusion_matrix.h:369
void clear_false_negatives()
Definition: binary_confusion_matrix.h:173
bool has_true_positives() const
Definition: binary_confusion_matrix.h:391
void set_accuracy(double value)
Definition: binary_confusion_matrix.h:119
Definition: aggregate_classification_metrics.h:37
double get_precision() const
Definition: binary_confusion_matrix.h:293
double get_accuracy() const
Definition: binary_confusion_matrix.h:107
bool has_false_negatives() const
Definition: binary_confusion_matrix.h:166
void set_false_positives(int64 value)
Definition: binary_confusion_matrix.h:230
int64 get_false_positives() const
Definition: binary_confusion_matrix.h:218
void set_recall(double value)
Definition: binary_confusion_matrix.h:344
bool has_accuracy() const
Definition: binary_confusion_matrix.h:92
void set_precision(double value)
Definition: binary_confusion_matrix.h:306
bool has_positive_class_threshold() const
Definition: binary_confusion_matrix.h:241
void set_true_positives(int64 value)
Definition: binary_confusion_matrix.h:418
bool has_precision() const
Definition: binary_confusion_matrix.h:278
double get_f1_score() const
Definition: binary_confusion_matrix.h:144
void set_false_negatives(int64 value)
Definition: binary_confusion_matrix.h:193