bigquery  v2
binary_confusion_matrix.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-03-07, 23:51:40 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // BigQuery API (bigquery/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 459
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BIGQUERY_API_BINARY_CONFUSION_MATRIX_H_
31 #define GOOGLE_BIGQUERY_API_BINARY_CONFUSION_MATRIX_H_
32 
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"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_bigquery_api {
43 using namespace googleapis;
44 
50 class BinaryConfusionMatrix : public client::JsonCppData {
51  public:
57  static BinaryConfusionMatrix* New();
58 
64  explicit BinaryConfusionMatrix(const Json::Value& storage);
65 
71  explicit BinaryConfusionMatrix(Json::Value* storage);
72 
76  virtual ~BinaryConfusionMatrix();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_bigquery_api::BinaryConfusionMatrix");
85  }
86 
92  bool has_accuracy() const {
93  return Storage().isMember("accuracy");
94  }
95 
99  void clear_accuracy() {
100  MutableStorage()->removeMember("accuracy");
101  }
102 
103 
107  double get_accuracy() const {
108  const Json::Value& storage = Storage("accuracy");
109  return client::JsonValueToCppValueHelper<double >(storage);
110  }
111 
119  void set_accuracy(double value) {
120  client::SetJsonValueFromCppValueHelper<double >(
121  value, MutableStorage("accuracy"));
122  }
123 
129  bool has_f1_score() const {
130  return Storage().isMember("f1Score");
131  }
132 
136  void clear_f1_score() {
137  MutableStorage()->removeMember("f1Score");
138  }
139 
140 
144  double get_f1_score() const {
145  const Json::Value& storage = Storage("f1Score");
146  return client::JsonValueToCppValueHelper<double >(storage);
147  }
148 
156  void set_f1_score(double value) {
157  client::SetJsonValueFromCppValueHelper<double >(
158  value, MutableStorage("f1Score"));
159  }
160 
166  bool has_false_negatives() const {
167  return Storage().isMember("falseNegatives");
168  }
169 
174  MutableStorage()->removeMember("falseNegatives");
175  }
176 
177 
181  int64 get_false_negatives() const {
182  const Json::Value& storage = Storage("falseNegatives");
183  return client::JsonValueToCppValueHelper<int64 >(storage);
184  }
185 
193  void set_false_negatives(int64 value) {
194  client::SetJsonValueFromCppValueHelper<int64 >(
195  value, MutableStorage("falseNegatives"));
196  }
197 
203  bool has_false_positives() const {
204  return Storage().isMember("falsePositives");
205  }
206 
211  MutableStorage()->removeMember("falsePositives");
212  }
213 
214 
218  int64 get_false_positives() const {
219  const Json::Value& storage = Storage("falsePositives");
220  return client::JsonValueToCppValueHelper<int64 >(storage);
221  }
222 
230  void set_false_positives(int64 value) {
231  client::SetJsonValueFromCppValueHelper<int64 >(
232  value, MutableStorage("falsePositives"));
233  }
234 
242  return Storage().isMember("positiveClassThreshold");
243  }
244 
249  MutableStorage()->removeMember("positiveClassThreshold");
250  }
251 
252 
257  const Json::Value& storage = Storage("positiveClassThreshold");
258  return client::JsonValueToCppValueHelper<double >(storage);
259  }
260 
268  void set_positive_class_threshold(double value) {
269  client::SetJsonValueFromCppValueHelper<double >(
270  value, MutableStorage("positiveClassThreshold"));
271  }
272 
278  bool has_precision() const {
279  return Storage().isMember("precision");
280  }
281 
286  MutableStorage()->removeMember("precision");
287  }
288 
289 
293  double get_precision() const {
294  const Json::Value& storage = Storage("precision");
295  return client::JsonValueToCppValueHelper<double >(storage);
296  }
297 
306  void set_precision(double value) {
307  client::SetJsonValueFromCppValueHelper<double >(
308  value, MutableStorage("precision"));
309  }
310 
316  bool has_recall() const {
317  return Storage().isMember("recall");
318  }
319 
323  void clear_recall() {
324  MutableStorage()->removeMember("recall");
325  }
326 
327 
331  double get_recall() const {
332  const Json::Value& storage = Storage("recall");
333  return client::JsonValueToCppValueHelper<double >(storage);
334  }
335 
344  void set_recall(double value) {
345  client::SetJsonValueFromCppValueHelper<double >(
346  value, MutableStorage("recall"));
347  }
348 
354  bool has_true_negatives() const {
355  return Storage().isMember("trueNegatives");
356  }
357 
362  MutableStorage()->removeMember("trueNegatives");
363  }
364 
365 
369  int64 get_true_negatives() const {
370  const Json::Value& storage = Storage("trueNegatives");
371  return client::JsonValueToCppValueHelper<int64 >(storage);
372  }
373 
381  void set_true_negatives(int64 value) {
382  client::SetJsonValueFromCppValueHelper<int64 >(
383  value, MutableStorage("trueNegatives"));
384  }
385 
391  bool has_true_positives() const {
392  return Storage().isMember("truePositives");
393  }
394 
399  MutableStorage()->removeMember("truePositives");
400  }
401 
402 
406  int64 get_true_positives() const {
407  const Json::Value& storage = Storage("truePositives");
408  return client::JsonValueToCppValueHelper<int64 >(storage);
409  }
410 
418  void set_true_positives(int64 value) {
419  client::SetJsonValueFromCppValueHelper<int64 >(
420  value, MutableStorage("truePositives"));
421  }
422 
423  private:
424  void operator=(const BinaryConfusionMatrix&);
425 }; // BinaryConfusionMatrix
426 } // namespace google_bigquery_api
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