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

namespace Google\Cloud\AutoMl\V1beta1;

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

/**
 * Metrics for regression problems.
 *
 * Generated from protobuf message <code>google.cloud.automl.v1beta1.RegressionEvaluationMetrics</code>
 */
class RegressionEvaluationMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Root Mean Squared Error (RMSE).
     *
     * Generated from protobuf field <code>float root_mean_squared_error = 1;</code>
     */
    private $root_mean_squared_error = 0.0;
    /**
     * Output only. Mean Absolute Error (MAE).
     *
     * Generated from protobuf field <code>float mean_absolute_error = 2;</code>
     */
    private $mean_absolute_error = 0.0;
    /**
     * Output only. Mean absolute percentage error. Only set if all ground truth
     * values are are positive.
     *
     * Generated from protobuf field <code>float mean_absolute_percentage_error = 3;</code>
     */
    private $mean_absolute_percentage_error = 0.0;
    /**
     * Output only. R squared.
     *
     * Generated from protobuf field <code>float r_squared = 4;</code>
     */
    private $r_squared = 0.0;
    /**
     * Output only. Root mean squared log error.
     *
     * Generated from protobuf field <code>float root_mean_squared_log_error = 5;</code>
     */
    private $root_mean_squared_log_error = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $root_mean_squared_error
     *           Output only. Root Mean Squared Error (RMSE).
     *     @type float $mean_absolute_error
     *           Output only. Mean Absolute Error (MAE).
     *     @type float $mean_absolute_percentage_error
     *           Output only. Mean absolute percentage error. Only set if all ground truth
     *           values are are positive.
     *     @type float $r_squared
     *           Output only. R squared.
     *     @type float $root_mean_squared_log_error
     *           Output only. Root mean squared log error.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Automl\V1Beta1\Regression::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Root Mean Squared Error (RMSE).
     *
     * Generated from protobuf field <code>float root_mean_squared_error = 1;</code>
     * @return float
     */
    public function getRootMeanSquaredError()
    {
        return $this->root_mean_squared_error;
    }

    /**
     * Output only. Root Mean Squared Error (RMSE).
     *
     * Generated from protobuf field <code>float root_mean_squared_error = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setRootMeanSquaredError($var)
    {
        GPBUtil::checkFloat($var);
        $this->root_mean_squared_error = $var;

        return $this;
    }

    /**
     * Output only. Mean Absolute Error (MAE).
     *
     * Generated from protobuf field <code>float mean_absolute_error = 2;</code>
     * @return float
     */
    public function getMeanAbsoluteError()
    {
        return $this->mean_absolute_error;
    }

    /**
     * Output only. Mean Absolute Error (MAE).
     *
     * Generated from protobuf field <code>float mean_absolute_error = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setMeanAbsoluteError($var)
    {
        GPBUtil::checkFloat($var);
        $this->mean_absolute_error = $var;

        return $this;
    }

    /**
     * Output only. Mean absolute percentage error. Only set if all ground truth
     * values are are positive.
     *
     * Generated from protobuf field <code>float mean_absolute_percentage_error = 3;</code>
     * @return float
     */
    public function getMeanAbsolutePercentageError()
    {
        return $this->mean_absolute_percentage_error;
    }

    /**
     * Output only. Mean absolute percentage error. Only set if all ground truth
     * values are are positive.
     *
     * Generated from protobuf field <code>float mean_absolute_percentage_error = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setMeanAbsolutePercentageError($var)
    {
        GPBUtil::checkFloat($var);
        $this->mean_absolute_percentage_error = $var;

        return $this;
    }

    /**
     * Output only. R squared.
     *
     * Generated from protobuf field <code>float r_squared = 4;</code>
     * @return float
     */
    public function getRSquared()
    {
        return $this->r_squared;
    }

    /**
     * Output only. R squared.
     *
     * Generated from protobuf field <code>float r_squared = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setRSquared($var)
    {
        GPBUtil::checkFloat($var);
        $this->r_squared = $var;

        return $this;
    }

    /**
     * Output only. Root mean squared log error.
     *
     * Generated from protobuf field <code>float root_mean_squared_log_error = 5;</code>
     * @return float
     */
    public function getRootMeanSquaredLogError()
    {
        return $this->root_mean_squared_log_error;
    }

    /**
     * Output only. Root mean squared log error.
     *
     * Generated from protobuf field <code>float root_mean_squared_log_error = 5;</code>
     * @param float $var
     * @return $this
     */
    public function setRootMeanSquaredLogError($var)
    {
        GPBUtil::checkFloat($var);
        $this->root_mean_squared_log_error = $var;

        return $this;
    }

}

