target.apidocs.com.google.api.services.bigquery.model.BinaryConfusionMatrix.html Maven / Gradle / Ivy
BinaryConfusionMatrix (BigQuery API v2-rev20240727-2.0.0)
com.google.api.services.bigquery.model
Class BinaryConfusionMatrix
- 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.BinaryConfusionMatrix
-
public final class BinaryConfusionMatrix
extends com.google.api.client.json.GenericJson
Confusion matrix for binary classification models.
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
BinaryConfusionMatrix()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
BinaryConfusionMatrix
clone()
Double
getAccuracy()
The fraction of predictions given the correct label.
Double
getF1Score()
The equally weighted average of recall and precision.
Long
getFalseNegatives()
Number of false samples predicted as false.
Long
getFalsePositives()
Number of false samples predicted as true.
Double
getPositiveClassThreshold()
Threshold value used when computing each of the following metric.
Double
getPrecision()
The fraction of actual positive predictions that had positive actual labels.
Double
getRecall()
The fraction of actual positive labels that were given a positive prediction.
Long
getTrueNegatives()
Number of true samples predicted as false.
Long
getTruePositives()
Number of true samples predicted as true.
BinaryConfusionMatrix
set(String fieldName,
Object value)
BinaryConfusionMatrix
setAccuracy(Double accuracy)
The fraction of predictions given the correct label.
BinaryConfusionMatrix
setF1Score(Double f1Score)
The equally weighted average of recall and precision.
BinaryConfusionMatrix
setFalseNegatives(Long falseNegatives)
Number of false samples predicted as false.
BinaryConfusionMatrix
setFalsePositives(Long falsePositives)
Number of false samples predicted as true.
BinaryConfusionMatrix
setPositiveClassThreshold(Double positiveClassThreshold)
Threshold value used when computing each of the following metric.
BinaryConfusionMatrix
setPrecision(Double precision)
The fraction of actual positive predictions that had positive actual labels.
BinaryConfusionMatrix
setRecall(Double recall)
The fraction of actual positive labels that were given a positive prediction.
BinaryConfusionMatrix
setTrueNegatives(Long trueNegatives)
Number of true samples predicted as false.
BinaryConfusionMatrix
setTruePositives(Long truePositives)
Number of true samples predicted as true.
-
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()
The fraction of predictions given the correct label.
- Returns:
- value or
null
for none
-
setAccuracy
public BinaryConfusionMatrix setAccuracy(Double accuracy)
The fraction of predictions given the correct label.
- Parameters:
accuracy
- accuracy or null
for none
-
getF1Score
public Double getF1Score()
The equally weighted average of recall and precision.
- Returns:
- value or
null
for none
-
setF1Score
public BinaryConfusionMatrix setF1Score(Double f1Score)
The equally weighted average of recall and precision.
- Parameters:
f1Score
- f1Score or null
for none
-
getFalseNegatives
public Long getFalseNegatives()
Number of false samples predicted as false.
- Returns:
- value or
null
for none
-
setFalseNegatives
public BinaryConfusionMatrix setFalseNegatives(Long falseNegatives)
Number of false samples predicted as false.
- Parameters:
falseNegatives
- falseNegatives or null
for none
-
getFalsePositives
public Long getFalsePositives()
Number of false samples predicted as true.
- Returns:
- value or
null
for none
-
setFalsePositives
public BinaryConfusionMatrix setFalsePositives(Long falsePositives)
Number of false samples predicted as true.
- Parameters:
falsePositives
- falsePositives or null
for none
-
getPositiveClassThreshold
public Double getPositiveClassThreshold()
Threshold value used when computing each of the following metric.
- Returns:
- value or
null
for none
-
setPositiveClassThreshold
public BinaryConfusionMatrix setPositiveClassThreshold(Double positiveClassThreshold)
Threshold value used when computing each of the following metric.
- Parameters:
positiveClassThreshold
- positiveClassThreshold or null
for none
-
getPrecision
public Double getPrecision()
The fraction of actual positive predictions that had positive actual labels.
- Returns:
- value or
null
for none
-
setPrecision
public BinaryConfusionMatrix setPrecision(Double precision)
The fraction of actual positive predictions that had positive actual labels.
- Parameters:
precision
- precision or null
for none
-
getRecall
public Double getRecall()
The fraction of actual positive labels that were given a positive prediction.
- Returns:
- value or
null
for none
-
setRecall
public BinaryConfusionMatrix setRecall(Double recall)
The fraction of actual positive labels that were given a positive prediction.
- Parameters:
recall
- recall or null
for none
-
getTrueNegatives
public Long getTrueNegatives()
Number of true samples predicted as false.
- Returns:
- value or
null
for none
-
setTrueNegatives
public BinaryConfusionMatrix setTrueNegatives(Long trueNegatives)
Number of true samples predicted as false.
- Parameters:
trueNegatives
- trueNegatives or null
for none
-
getTruePositives
public Long getTruePositives()
Number of true samples predicted as true.
- Returns:
- value or
null
for none
-
setTruePositives
public BinaryConfusionMatrix setTruePositives(Long truePositives)
Number of true samples predicted as true.
- Parameters:
truePositives
- truePositives or null
for none
-
set
public BinaryConfusionMatrix set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public BinaryConfusionMatrix clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.