All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.forecast.model.Metrics Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Forecast module holds the client classes that are used for communicating with Amazon Forecast Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.forecast.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Provides metrics that are used to evaluate the performance of a predictor. This object is part of the * WindowSummary object. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Metrics implements Serializable, Cloneable, StructuredPojo { /** *

* The root mean square error (RMSE). *

*/ private Double rMSE; /** *

* An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. *

*/ private java.util.List weightedQuantileLosses; /** *

* The root mean square error (RMSE). *

* * @param rMSE * The root mean square error (RMSE). */ public void setRMSE(Double rMSE) { this.rMSE = rMSE; } /** *

* The root mean square error (RMSE). *

* * @return The root mean square error (RMSE). */ public Double getRMSE() { return this.rMSE; } /** *

* The root mean square error (RMSE). *

* * @param rMSE * The root mean square error (RMSE). * @return Returns a reference to this object so that method calls can be chained together. */ public Metrics withRMSE(Double rMSE) { setRMSE(rMSE); return this; } /** *

* An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. *

* * @return An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. */ public java.util.List getWeightedQuantileLosses() { return weightedQuantileLosses; } /** *

* An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. *

* * @param weightedQuantileLosses * An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. */ public void setWeightedQuantileLosses(java.util.Collection weightedQuantileLosses) { if (weightedQuantileLosses == null) { this.weightedQuantileLosses = null; return; } this.weightedQuantileLosses = new java.util.ArrayList(weightedQuantileLosses); } /** *

* An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setWeightedQuantileLosses(java.util.Collection)} or * {@link #withWeightedQuantileLosses(java.util.Collection)} if you want to override the existing values. *

* * @param weightedQuantileLosses * An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. * @return Returns a reference to this object so that method calls can be chained together. */ public Metrics withWeightedQuantileLosses(WeightedQuantileLoss... weightedQuantileLosses) { if (this.weightedQuantileLosses == null) { setWeightedQuantileLosses(new java.util.ArrayList(weightedQuantileLosses.length)); } for (WeightedQuantileLoss ele : weightedQuantileLosses) { this.weightedQuantileLosses.add(ele); } return this; } /** *

* An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. *

* * @param weightedQuantileLosses * An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal * probability. The distribution in this case is the loss function. * @return Returns a reference to this object so that method calls can be chained together. */ public Metrics withWeightedQuantileLosses(java.util.Collection weightedQuantileLosses) { setWeightedQuantileLosses(weightedQuantileLosses); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getRMSE() != null) sb.append("RMSE: ").append(getRMSE()).append(","); if (getWeightedQuantileLosses() != null) sb.append("WeightedQuantileLosses: ").append(getWeightedQuantileLosses()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Metrics == false) return false; Metrics other = (Metrics) obj; if (other.getRMSE() == null ^ this.getRMSE() == null) return false; if (other.getRMSE() != null && other.getRMSE().equals(this.getRMSE()) == false) return false; if (other.getWeightedQuantileLosses() == null ^ this.getWeightedQuantileLosses() == null) return false; if (other.getWeightedQuantileLosses() != null && other.getWeightedQuantileLosses().equals(this.getWeightedQuantileLosses()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRMSE() == null) ? 0 : getRMSE().hashCode()); hashCode = prime * hashCode + ((getWeightedQuantileLosses() == null) ? 0 : getWeightedQuantileLosses().hashCode()); return hashCode; } @Override public Metrics clone() { try { return (Metrics) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.forecast.model.transform.MetricsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy