Class ClassificationEvaluationMetrics.ConfusionMatrix.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder>
com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Builder
All Implemented Interfaces:
ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ClassificationEvaluationMetrics.ConfusionMatrix

public static final class ClassificationEvaluationMetrics.ConfusionMatrix.Builder extends com.google.protobuf.GeneratedMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder> implements ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
 Confusion matrix of the model running the classification.
 
Protobuf type google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder>
    • getDefaultInstanceForType

      public ClassificationEvaluationMetrics.ConfusionMatrix getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ClassificationEvaluationMetrics.ConfusionMatrix.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder>
    • mergeFrom

      public ClassificationEvaluationMetrics.ConfusionMatrix.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ClassificationEvaluationMetrics.ConfusionMatrix.Builder>
      Throws:
      IOException
    • getAnnotationSpecIdList

      public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList()
       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Specified by:
      getAnnotationSpecIdList in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Returns:
      A list containing the annotationSpecId.
    • getAnnotationSpecIdCount

      public int getAnnotationSpecIdCount()
       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Specified by:
      getAnnotationSpecIdCount in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Returns:
      The count of annotationSpecId.
    • getAnnotationSpecId

      public String getAnnotationSpecId(int index)
       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Specified by:
      getAnnotationSpecId in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The annotationSpecId at the given index.
    • getAnnotationSpecIdBytes

      public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index)
       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Specified by:
      getAnnotationSpecIdBytes in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the annotationSpecId at the given index.
    • setAnnotationSpecId

      public ClassificationEvaluationMetrics.ConfusionMatrix.Builder setAnnotationSpecId(int index, String value)
       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Parameters:
      index - The index to set the value at.
      value - The annotationSpecId to set.
      Returns:
      This builder for chaining.
    • addAnnotationSpecId

       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Parameters:
      value - The annotationSpecId to add.
      Returns:
      This builder for chaining.
    • addAllAnnotationSpecId

       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Parameters:
      values - The annotationSpecId to add.
      Returns:
      This builder for chaining.
    • clearAnnotationSpecId

       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Returns:
      This builder for chaining.
    • addAnnotationSpecIdBytes

      public ClassificationEvaluationMetrics.ConfusionMatrix.Builder addAnnotationSpecIdBytes(com.google.protobuf.ByteString value)
       Output only. IDs of the annotation specs used in the confusion matrix.
       For Tables CLASSIFICATION
       [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
       only list of [annotation_spec_display_name-s][] is populated.
       
      repeated string annotation_spec_id = 1;
      Parameters:
      value - The bytes of the annotationSpecId to add.
      Returns:
      This builder for chaining.
    • getDisplayNameList

      public com.google.protobuf.ProtocolStringList getDisplayNameList()
       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Specified by:
      getDisplayNameList in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Returns:
      A list containing the displayName.
    • getDisplayNameCount

      public int getDisplayNameCount()
       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Specified by:
      getDisplayNameCount in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Returns:
      The count of displayName.
    • getDisplayName

      public String getDisplayName(int index)
       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Specified by:
      getDisplayName in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The displayName at the given index.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes(int index)
       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Specified by:
      getDisplayNameBytes in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the displayName at the given index.
    • setDisplayName

      public ClassificationEvaluationMetrics.ConfusionMatrix.Builder setDisplayName(int index, String value)
       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Parameters:
      index - The index to set the value at.
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • addDisplayName

       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Parameters:
      value - The displayName to add.
      Returns:
      This builder for chaining.
    • addAllDisplayName

       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Parameters:
      values - The displayName to add.
      Returns:
      This builder for chaining.
    • clearDisplayName

       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Returns:
      This builder for chaining.
    • addDisplayNameBytes

      public ClassificationEvaluationMetrics.ConfusionMatrix.Builder addDisplayNameBytes(com.google.protobuf.ByteString value)
       Output only. Display name of the annotation specs used in the confusion
       matrix, as they were at the moment of the evaluation. For Tables
       CLASSIFICATION
       [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
       distinct values of the target column at the moment of the model
       evaluation are populated here.
       
      repeated string display_name = 3;
      Parameters:
      value - The bytes of the displayName to add.
      Returns:
      This builder for chaining.
    • getRowList

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
      Specified by:
      getRowList in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
    • getRowCount

      public int getRowCount()
       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
      Specified by:
      getRowCount in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
    • getRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
      Specified by:
      getRow in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
    • setRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • setRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • addRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • addRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • addRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • addRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • addAllRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • clearRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • removeRow

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • getRowBuilder

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • getRowOrBuilder

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
      Specified by:
      getRowOrBuilder in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
    • getRowOrBuilderList

      public List<? extends ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> getRowOrBuilderList()
       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
      Specified by:
      getRowOrBuilderList in interface ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder
    • addRowBuilder

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • addRowBuilder

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;
    • getRowBuilderList

       Output only. Rows in the confusion matrix. The number of rows is equal to
       the size of `annotation_spec_id`.
       `row[i].example_count[j]` is the number of examples that have ground
       truth of the `annotation_spec_id[i]` and are predicted as
       `annotation_spec_id[j]` by the model being evaluated.
       
      repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;