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

com.amazonaws.services.sagemaker.model.HyperParameterSpecification Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * Copyright 2019-2024 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.sagemaker.model;

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

/**
 * 

* Defines a hyperparameter to be used by an algorithm. *

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

* The name of this hyperparameter. The name must be unique. *

*/ private String name; /** *

* A brief description of the hyperparameter. *

*/ private String description; /** *

* The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. *

*/ private String type; /** *

* The allowed range for this hyperparameter. *

*/ private ParameterRange range; /** *

* Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. *

*/ private Boolean isTunable; /** *

* Indicates whether this hyperparameter is required. *

*/ private Boolean isRequired; /** *

* The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required. *

*/ private String defaultValue; /** *

* The name of this hyperparameter. The name must be unique. *

* * @param name * The name of this hyperparameter. The name must be unique. */ public void setName(String name) { this.name = name; } /** *

* The name of this hyperparameter. The name must be unique. *

* * @return The name of this hyperparameter. The name must be unique. */ public String getName() { return this.name; } /** *

* The name of this hyperparameter. The name must be unique. *

* * @param name * The name of this hyperparameter. The name must be unique. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterSpecification withName(String name) { setName(name); return this; } /** *

* A brief description of the hyperparameter. *

* * @param description * A brief description of the hyperparameter. */ public void setDescription(String description) { this.description = description; } /** *

* A brief description of the hyperparameter. *

* * @return A brief description of the hyperparameter. */ public String getDescription() { return this.description; } /** *

* A brief description of the hyperparameter. *

* * @param description * A brief description of the hyperparameter. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterSpecification withDescription(String description) { setDescription(description); return this; } /** *

* The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. *

* * @param type * The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. * @see ParameterType */ public void setType(String type) { this.type = type; } /** *

* The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. *

* * @return The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. * @see ParameterType */ public String getType() { return this.type; } /** *

* The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. *

* * @param type * The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. * @return Returns a reference to this object so that method calls can be chained together. * @see ParameterType */ public HyperParameterSpecification withType(String type) { setType(type); return this; } /** *

* The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. *

* * @param type * The type of this hyperparameter. The valid types are Integer, Continuous, * Categorical, and FreeText. * @return Returns a reference to this object so that method calls can be chained together. * @see ParameterType */ public HyperParameterSpecification withType(ParameterType type) { this.type = type.toString(); return this; } /** *

* The allowed range for this hyperparameter. *

* * @param range * The allowed range for this hyperparameter. */ public void setRange(ParameterRange range) { this.range = range; } /** *

* The allowed range for this hyperparameter. *

* * @return The allowed range for this hyperparameter. */ public ParameterRange getRange() { return this.range; } /** *

* The allowed range for this hyperparameter. *

* * @param range * The allowed range for this hyperparameter. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterSpecification withRange(ParameterRange range) { setRange(range); return this; } /** *

* Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. *

* * @param isTunable * Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. */ public void setIsTunable(Boolean isTunable) { this.isTunable = isTunable; } /** *

* Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. *

* * @return Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. */ public Boolean getIsTunable() { return this.isTunable; } /** *

* Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. *

* * @param isTunable * Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterSpecification withIsTunable(Boolean isTunable) { setIsTunable(isTunable); return this; } /** *

* Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. *

* * @return Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. */ public Boolean isTunable() { return this.isTunable; } /** *

* Indicates whether this hyperparameter is required. *

* * @param isRequired * Indicates whether this hyperparameter is required. */ public void setIsRequired(Boolean isRequired) { this.isRequired = isRequired; } /** *

* Indicates whether this hyperparameter is required. *

* * @return Indicates whether this hyperparameter is required. */ public Boolean getIsRequired() { return this.isRequired; } /** *

* Indicates whether this hyperparameter is required. *

* * @param isRequired * Indicates whether this hyperparameter is required. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterSpecification withIsRequired(Boolean isRequired) { setIsRequired(isRequired); return this; } /** *

* Indicates whether this hyperparameter is required. *

* * @return Indicates whether this hyperparameter is required. */ public Boolean isRequired() { return this.isRequired; } /** *

* The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required. *

* * @param defaultValue * The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be * required. */ public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; } /** *

* The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required. *

* * @return The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be * required. */ public String getDefaultValue() { return this.defaultValue; } /** *

* The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required. *

* * @param defaultValue * The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be * required. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterSpecification withDefaultValue(String defaultValue) { setDefaultValue(defaultValue); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getRange() != null) sb.append("Range: ").append(getRange()).append(","); if (getIsTunable() != null) sb.append("IsTunable: ").append(getIsTunable()).append(","); if (getIsRequired() != null) sb.append("IsRequired: ").append(getIsRequired()).append(","); if (getDefaultValue() != null) sb.append("DefaultValue: ").append(getDefaultValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HyperParameterSpecification == false) return false; HyperParameterSpecification other = (HyperParameterSpecification) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getRange() == null ^ this.getRange() == null) return false; if (other.getRange() != null && other.getRange().equals(this.getRange()) == false) return false; if (other.getIsTunable() == null ^ this.getIsTunable() == null) return false; if (other.getIsTunable() != null && other.getIsTunable().equals(this.getIsTunable()) == false) return false; if (other.getIsRequired() == null ^ this.getIsRequired() == null) return false; if (other.getIsRequired() != null && other.getIsRequired().equals(this.getIsRequired()) == false) return false; if (other.getDefaultValue() == null ^ this.getDefaultValue() == null) return false; if (other.getDefaultValue() != null && other.getDefaultValue().equals(this.getDefaultValue()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getRange() == null) ? 0 : getRange().hashCode()); hashCode = prime * hashCode + ((getIsTunable() == null) ? 0 : getIsTunable().hashCode()); hashCode = prime * hashCode + ((getIsRequired() == null) ? 0 : getIsRequired().hashCode()); hashCode = prime * hashCode + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode()); return hashCode; } @Override public HyperParameterSpecification clone() { try { return (HyperParameterSpecification) 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.sagemaker.model.transform.HyperParameterSpecificationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy