target.apidocs.com.google.api.services.bigquery.model.AggregateClassificationMetrics.html Maven / Gradle / Ivy
AggregateClassificationMetrics (BigQuery API v2-rev20240727-2.0.0)
com.google.api.services.bigquery.model
Class AggregateClassificationMetrics
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.bigquery.model.AggregateClassificationMetrics
-
public final class AggregateClassificationMetrics
extends com.google.api.client.json.GenericJson
Aggregate metrics for classification/classifier models. For multi-class models, the metrics are
either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each
label and then an unweighted average is taken of those values. When micro-averaged, the metric is
calculated globally by counting the total number of correctly predicted rows.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the BigQuery API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
AggregateClassificationMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
AggregateClassificationMetrics
clone()
Double
getAccuracy()
Accuracy is the fraction of predictions given the correct label.
Double
getF1Score()
The F1 score is an average of recall and precision.
Double
getLogLoss()
Logarithmic Loss.
Double
getPrecision()
Precision is the fraction of actual positive predictions that had positive actual labels.
Double
getRecall()
Recall is the fraction of actual positive labels that were given a positive prediction.
Double
getRocAuc()
Area Under a ROC Curve.
Double
getThreshold()
Threshold at which the metrics are computed.
AggregateClassificationMetrics
set(String fieldName,
Object value)
AggregateClassificationMetrics
setAccuracy(Double accuracy)
Accuracy is the fraction of predictions given the correct label.
AggregateClassificationMetrics
setF1Score(Double f1Score)
The F1 score is an average of recall and precision.
AggregateClassificationMetrics
setLogLoss(Double logLoss)
Logarithmic Loss.
AggregateClassificationMetrics
setPrecision(Double precision)
Precision is the fraction of actual positive predictions that had positive actual labels.
AggregateClassificationMetrics
setRecall(Double recall)
Recall is the fraction of actual positive labels that were given a positive prediction.
AggregateClassificationMetrics
setRocAuc(Double rocAuc)
Area Under a ROC Curve.
AggregateClassificationMetrics
setThreshold(Double threshold)
Threshold at which the metrics are computed.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAccuracy
public Double getAccuracy()
Accuracy is the fraction of predictions given the correct label. For multiclass this is a
micro-averaged metric.
- Returns:
- value or
null
for none
-
setAccuracy
public AggregateClassificationMetrics setAccuracy(Double accuracy)
Accuracy is the fraction of predictions given the correct label. For multiclass this is a
micro-averaged metric.
- Parameters:
accuracy
- accuracy or null
for none
-
getF1Score
public Double getF1Score()
The F1 score is an average of recall and precision. For multiclass this is a macro-averaged
metric.
- Returns:
- value or
null
for none
-
setF1Score
public AggregateClassificationMetrics setF1Score(Double f1Score)
The F1 score is an average of recall and precision. For multiclass this is a macro-averaged
metric.
- Parameters:
f1Score
- f1Score or null
for none
-
getLogLoss
public Double getLogLoss()
Logarithmic Loss. For multiclass this is a macro-averaged metric.
- Returns:
- value or
null
for none
-
setLogLoss
public AggregateClassificationMetrics setLogLoss(Double logLoss)
Logarithmic Loss. For multiclass this is a macro-averaged metric.
- Parameters:
logLoss
- logLoss or null
for none
-
getPrecision
public Double getPrecision()
Precision is the fraction of actual positive predictions that had positive actual labels. For
multiclass this is a macro-averaged metric treating each class as a binary classifier.
- Returns:
- value or
null
for none
-
setPrecision
public AggregateClassificationMetrics setPrecision(Double precision)
Precision is the fraction of actual positive predictions that had positive actual labels. For
multiclass this is a macro-averaged metric treating each class as a binary classifier.
- Parameters:
precision
- precision or null
for none
-
getRecall
public Double getRecall()
Recall is the fraction of actual positive labels that were given a positive prediction. For
multiclass this is a macro-averaged metric.
- Returns:
- value or
null
for none
-
setRecall
public AggregateClassificationMetrics setRecall(Double recall)
Recall is the fraction of actual positive labels that were given a positive prediction. For
multiclass this is a macro-averaged metric.
- Parameters:
recall
- recall or null
for none
-
getRocAuc
public Double getRocAuc()
Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
- Returns:
- value or
null
for none
-
setRocAuc
public AggregateClassificationMetrics setRocAuc(Double rocAuc)
Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
- Parameters:
rocAuc
- rocAuc or null
for none
-
getThreshold
public Double getThreshold()
Threshold at which the metrics are computed. For binary classification models this is the
positive class threshold. For multi-class classfication models this is the confidence
threshold.
- Returns:
- value or
null
for none
-
setThreshold
public AggregateClassificationMetrics setThreshold(Double threshold)
Threshold at which the metrics are computed. For binary classification models this is the
positive class threshold. For multi-class classfication models this is the confidence
threshold.
- Parameters:
threshold
- threshold or null
for none
-
set
public AggregateClassificationMetrics set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public AggregateClassificationMetrics clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.