Class TextSentimentEvaluationMetrics.Builder

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

public static final class TextSentimentEvaluationMetrics.Builder extends com.google.protobuf.GeneratedMessage.Builder<TextSentimentEvaluationMetrics.Builder> implements TextSentimentEvaluationMetricsOrBuilder
 Model evaluation metrics for text sentiment problems.
 
Protobuf type google.cloud.automl.v1.TextSentimentEvaluationMetrics
  • 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<TextSentimentEvaluationMetrics.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<TextSentimentEvaluationMetrics.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<TextSentimentEvaluationMetrics.Builder>
    • getDefaultInstanceForType

      public TextSentimentEvaluationMetrics 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

      public TextSentimentEvaluationMetrics buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public TextSentimentEvaluationMetrics.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<TextSentimentEvaluationMetrics.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<TextSentimentEvaluationMetrics.Builder>
    • mergeFrom

      public TextSentimentEvaluationMetrics.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<TextSentimentEvaluationMetrics.Builder>
      Throws:
      IOException
    • getPrecision

      public float getPrecision()
       Output only. Precision.
       
      float precision = 1;
      Specified by:
      getPrecision in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The precision.
    • setPrecision

      public TextSentimentEvaluationMetrics.Builder setPrecision(float value)
       Output only. Precision.
       
      float precision = 1;
      Parameters:
      value - The precision to set.
      Returns:
      This builder for chaining.
    • clearPrecision

      public TextSentimentEvaluationMetrics.Builder clearPrecision()
       Output only. Precision.
       
      float precision = 1;
      Returns:
      This builder for chaining.
    • getRecall

      public float getRecall()
       Output only. Recall.
       
      float recall = 2;
      Specified by:
      getRecall in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The recall.
    • setRecall

      public TextSentimentEvaluationMetrics.Builder setRecall(float value)
       Output only. Recall.
       
      float recall = 2;
      Parameters:
      value - The recall to set.
      Returns:
      This builder for chaining.
    • clearRecall

       Output only. Recall.
       
      float recall = 2;
      Returns:
      This builder for chaining.
    • getF1Score

      public float getF1Score()
       Output only. The harmonic mean of recall and precision.
       
      float f1_score = 3;
      Specified by:
      getF1Score in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The f1Score.
    • setF1Score

      public TextSentimentEvaluationMetrics.Builder setF1Score(float value)
       Output only. The harmonic mean of recall and precision.
       
      float f1_score = 3;
      Parameters:
      value - The f1Score to set.
      Returns:
      This builder for chaining.
    • clearF1Score

       Output only. The harmonic mean of recall and precision.
       
      float f1_score = 3;
      Returns:
      This builder for chaining.
    • getMeanAbsoluteError

      public float getMeanAbsoluteError()
       Output only. Mean absolute error. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float mean_absolute_error = 4;
      Specified by:
      getMeanAbsoluteError in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The meanAbsoluteError.
    • setMeanAbsoluteError

      public TextSentimentEvaluationMetrics.Builder setMeanAbsoluteError(float value)
       Output only. Mean absolute error. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float mean_absolute_error = 4;
      Parameters:
      value - The meanAbsoluteError to set.
      Returns:
      This builder for chaining.
    • clearMeanAbsoluteError

      public TextSentimentEvaluationMetrics.Builder clearMeanAbsoluteError()
       Output only. Mean absolute error. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float mean_absolute_error = 4;
      Returns:
      This builder for chaining.
    • getMeanSquaredError

      public float getMeanSquaredError()
       Output only. Mean squared error. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float mean_squared_error = 5;
      Specified by:
      getMeanSquaredError in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The meanSquaredError.
    • setMeanSquaredError

      public TextSentimentEvaluationMetrics.Builder setMeanSquaredError(float value)
       Output only. Mean squared error. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float mean_squared_error = 5;
      Parameters:
      value - The meanSquaredError to set.
      Returns:
      This builder for chaining.
    • clearMeanSquaredError

      public TextSentimentEvaluationMetrics.Builder clearMeanSquaredError()
       Output only. Mean squared error. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float mean_squared_error = 5;
      Returns:
      This builder for chaining.
    • getLinearKappa

      public float getLinearKappa()
       Output only. Linear weighted kappa. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float linear_kappa = 6;
      Specified by:
      getLinearKappa in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The linearKappa.
    • setLinearKappa

      public TextSentimentEvaluationMetrics.Builder setLinearKappa(float value)
       Output only. Linear weighted kappa. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float linear_kappa = 6;
      Parameters:
      value - The linearKappa to set.
      Returns:
      This builder for chaining.
    • clearLinearKappa

      public TextSentimentEvaluationMetrics.Builder clearLinearKappa()
       Output only. Linear weighted kappa. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float linear_kappa = 6;
      Returns:
      This builder for chaining.
    • getQuadraticKappa

      public float getQuadraticKappa()
       Output only. Quadratic weighted kappa. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float quadratic_kappa = 7;
      Specified by:
      getQuadraticKappa in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The quadraticKappa.
    • setQuadraticKappa

      public TextSentimentEvaluationMetrics.Builder setQuadraticKappa(float value)
       Output only. Quadratic weighted kappa. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float quadratic_kappa = 7;
      Parameters:
      value - The quadraticKappa to set.
      Returns:
      This builder for chaining.
    • clearQuadraticKappa

      public TextSentimentEvaluationMetrics.Builder clearQuadraticKappa()
       Output only. Quadratic weighted kappa. Only set for the overall model
       evaluation, not for evaluation of a single annotation spec.
       
      float quadratic_kappa = 7;
      Returns:
      This builder for chaining.
    • hasConfusionMatrix

      public boolean hasConfusionMatrix()
       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
      Specified by:
      hasConfusionMatrix in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      Whether the confusionMatrix field is set.
    • getConfusionMatrix

       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
      Specified by:
      getConfusionMatrix in interface TextSentimentEvaluationMetricsOrBuilder
      Returns:
      The confusionMatrix.
    • setConfusionMatrix

       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
    • setConfusionMatrix

       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
    • mergeConfusionMatrix

       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
    • clearConfusionMatrix

      public TextSentimentEvaluationMetrics.Builder clearConfusionMatrix()
       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
    • getConfusionMatrixBuilder

      public ClassificationEvaluationMetrics.ConfusionMatrix.Builder getConfusionMatrixBuilder()
       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
    • getConfusionMatrixOrBuilder

      public ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder getConfusionMatrixOrBuilder()
       Output only. Confusion matrix of the evaluation.
       Only set for the overall model evaluation, not for evaluation of a single
       annotation spec.
       
      .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
      Specified by:
      getConfusionMatrixOrBuilder in interface TextSentimentEvaluationMetricsOrBuilder