<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/evaluation.proto

namespace Google\Cloud\DataLabeling\V1beta1\PrCurve;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry</code>
 */
class ConfidenceMetricsEntry extends \Google\Protobuf\Internal\Message
{
    /**
     * Threshold used for this entry.
     * For classification tasks, this is a classification threshold: a
     * predicted label is categorized as positive or negative (in the context of
     * this point on the PR curve) based on whether the label's score meets this
     * threshold.
     * For image object detection (bounding box) tasks, this is the
     * [intersection-over-union
     * (IOU)](https://cloud.google.com/vision/automl/object-detection/docs/evaluate#intersection-over-union)
     * threshold for the context of this point on the PR curve.
     *
     * Generated from protobuf field <code>float confidence_threshold = 1;</code>
     */
    private $confidence_threshold = 0.0;
    /**
     * Recall value.
     *
     * Generated from protobuf field <code>float recall = 2;</code>
     */
    private $recall = 0.0;
    /**
     * Precision value.
     *
     * Generated from protobuf field <code>float precision = 3;</code>
     */
    private $precision = 0.0;
    /**
     * Harmonic mean of recall and precision.
     *
     * Generated from protobuf field <code>float f1_score = 4;</code>
     */
    private $f1_score = 0.0;
    /**
     * Recall value for entries with label that has highest score.
     *
     * Generated from protobuf field <code>float recall_at1 = 5;</code>
     */
    private $recall_at1 = 0.0;
    /**
     * Precision value for entries with label that has highest score.
     *
     * Generated from protobuf field <code>float precision_at1 = 6;</code>
     */
    private $precision_at1 = 0.0;
    /**
     * The harmonic mean of [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1].
     *
     * Generated from protobuf field <code>float f1_score_at1 = 7;</code>
     */
    private $f1_score_at1 = 0.0;
    /**
     * Recall value for entries with label that has highest 5 scores.
     *
     * Generated from protobuf field <code>float recall_at5 = 8;</code>
     */
    private $recall_at5 = 0.0;
    /**
     * Precision value for entries with label that has highest 5 scores.
     *
     * Generated from protobuf field <code>float precision_at5 = 9;</code>
     */
    private $precision_at5 = 0.0;
    /**
     * The harmonic mean of [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] and [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5].
     *
     * Generated from protobuf field <code>float f1_score_at5 = 10;</code>
     */
    private $f1_score_at5 = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $confidence_threshold
     *           Threshold used for this entry.
     *           For classification tasks, this is a classification threshold: a
     *           predicted label is categorized as positive or negative (in the context of
     *           this point on the PR curve) based on whether the label's score meets this
     *           threshold.
     *           For image object detection (bounding box) tasks, this is the
     *           [intersection-over-union
     *           (IOU)](https://cloud.google.com/vision/automl/object-detection/docs/evaluate#intersection-over-union)
     *           threshold for the context of this point on the PR curve.
     *     @type float $recall
     *           Recall value.
     *     @type float $precision
     *           Precision value.
     *     @type float $f1_score
     *           Harmonic mean of recall and precision.
     *     @type float $recall_at1
     *           Recall value for entries with label that has highest score.
     *     @type float $precision_at1
     *           Precision value for entries with label that has highest score.
     *     @type float $f1_score_at1
     *           The harmonic mean of [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1].
     *     @type float $recall_at5
     *           Recall value for entries with label that has highest 5 scores.
     *     @type float $precision_at5
     *           Precision value for entries with label that has highest 5 scores.
     *     @type float $f1_score_at5
     *           The harmonic mean of [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] and [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Evaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * Threshold used for this entry.
     * For classification tasks, this is a classification threshold: a
     * predicted label is categorized as positive or negative (in the context of
     * this point on the PR curve) based on whether the label's score meets this
     * threshold.
     * For image object detection (bounding box) tasks, this is the
     * [intersection-over-union
     * (IOU)](https://cloud.google.com/vision/automl/object-detection/docs/evaluate#intersection-over-union)
     * threshold for the context of this point on the PR curve.
     *
     * Generated from protobuf field <code>float confidence_threshold = 1;</code>
     * @return float
     */
    public function getConfidenceThreshold()
    {
        return $this->confidence_threshold;
    }

    /**
     * Threshold used for this entry.
     * For classification tasks, this is a classification threshold: a
     * predicted label is categorized as positive or negative (in the context of
     * this point on the PR curve) based on whether the label's score meets this
     * threshold.
     * For image object detection (bounding box) tasks, this is the
     * [intersection-over-union
     * (IOU)](https://cloud.google.com/vision/automl/object-detection/docs/evaluate#intersection-over-union)
     * threshold for the context of this point on the PR curve.
     *
     * Generated from protobuf field <code>float confidence_threshold = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setConfidenceThreshold($var)
    {
        GPBUtil::checkFloat($var);
        $this->confidence_threshold = $var;

        return $this;
    }

    /**
     * Recall value.
     *
     * Generated from protobuf field <code>float recall = 2;</code>
     * @return float
     */
    public function getRecall()
    {
        return $this->recall;
    }

    /**
     * Recall value.
     *
     * Generated from protobuf field <code>float recall = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setRecall($var)
    {
        GPBUtil::checkFloat($var);
        $this->recall = $var;

        return $this;
    }

    /**
     * Precision value.
     *
     * Generated from protobuf field <code>float precision = 3;</code>
     * @return float
     */
    public function getPrecision()
    {
        return $this->precision;
    }

    /**
     * Precision value.
     *
     * Generated from protobuf field <code>float precision = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setPrecision($var)
    {
        GPBUtil::checkFloat($var);
        $this->precision = $var;

        return $this;
    }

    /**
     * Harmonic mean of recall and precision.
     *
     * Generated from protobuf field <code>float f1_score = 4;</code>
     * @return float
     */
    public function getF1Score()
    {
        return $this->f1_score;
    }

    /**
     * Harmonic mean of recall and precision.
     *
     * Generated from protobuf field <code>float f1_score = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setF1Score($var)
    {
        GPBUtil::checkFloat($var);
        $this->f1_score = $var;

        return $this;
    }

    /**
     * Recall value for entries with label that has highest score.
     *
     * Generated from protobuf field <code>float recall_at1 = 5;</code>
     * @return float
     */
    public function getRecallAt1()
    {
        return $this->recall_at1;
    }

    /**
     * Recall value for entries with label that has highest score.
     *
     * Generated from protobuf field <code>float recall_at1 = 5;</code>
     * @param float $var
     * @return $this
     */
    public function setRecallAt1($var)
    {
        GPBUtil::checkFloat($var);
        $this->recall_at1 = $var;

        return $this;
    }

    /**
     * Precision value for entries with label that has highest score.
     *
     * Generated from protobuf field <code>float precision_at1 = 6;</code>
     * @return float
     */
    public function getPrecisionAt1()
    {
        return $this->precision_at1;
    }

    /**
     * Precision value for entries with label that has highest score.
     *
     * Generated from protobuf field <code>float precision_at1 = 6;</code>
     * @param float $var
     * @return $this
     */
    public function setPrecisionAt1($var)
    {
        GPBUtil::checkFloat($var);
        $this->precision_at1 = $var;

        return $this;
    }

    /**
     * The harmonic mean of [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1].
     *
     * Generated from protobuf field <code>float f1_score_at1 = 7;</code>
     * @return float
     */
    public function getF1ScoreAt1()
    {
        return $this->f1_score_at1;
    }

    /**
     * The harmonic mean of [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1].
     *
     * Generated from protobuf field <code>float f1_score_at1 = 7;</code>
     * @param float $var
     * @return $this
     */
    public function setF1ScoreAt1($var)
    {
        GPBUtil::checkFloat($var);
        $this->f1_score_at1 = $var;

        return $this;
    }

    /**
     * Recall value for entries with label that has highest 5 scores.
     *
     * Generated from protobuf field <code>float recall_at5 = 8;</code>
     * @return float
     */
    public function getRecallAt5()
    {
        return $this->recall_at5;
    }

    /**
     * Recall value for entries with label that has highest 5 scores.
     *
     * Generated from protobuf field <code>float recall_at5 = 8;</code>
     * @param float $var
     * @return $this
     */
    public function setRecallAt5($var)
    {
        GPBUtil::checkFloat($var);
        $this->recall_at5 = $var;

        return $this;
    }

    /**
     * Precision value for entries with label that has highest 5 scores.
     *
     * Generated from protobuf field <code>float precision_at5 = 9;</code>
     * @return float
     */
    public function getPrecisionAt5()
    {
        return $this->precision_at5;
    }

    /**
     * Precision value for entries with label that has highest 5 scores.
     *
     * Generated from protobuf field <code>float precision_at5 = 9;</code>
     * @param float $var
     * @return $this
     */
    public function setPrecisionAt5($var)
    {
        GPBUtil::checkFloat($var);
        $this->precision_at5 = $var;

        return $this;
    }

    /**
     * The harmonic mean of [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] and [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5].
     *
     * Generated from protobuf field <code>float f1_score_at5 = 10;</code>
     * @return float
     */
    public function getF1ScoreAt5()
    {
        return $this->f1_score_at5;
    }

    /**
     * The harmonic mean of [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] and [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5].
     *
     * Generated from protobuf field <code>float f1_score_at5 = 10;</code>
     * @param float $var
     * @return $this
     */
    public function setF1ScoreAt5($var)
    {
        GPBUtil::checkFloat($var);
        $this->f1_score_at5 = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ConfidenceMetricsEntry::class, \Google\Cloud\DataLabeling\V1beta1\PrCurve_ConfidenceMetricsEntry::class);

