CategoricalParameter: CategoricalParameter Class

CategoricalParameterR Documentation

CategoricalParameter Class

Description

A class for representing hyperparameters that have a discrete list of possible values.

Super class

sagemaker.mlcore::ParameterRange -> CategoricalParameter

Public fields

.name

Helps to categorise Class

values

The possible values for the hyperparameter

Methods

Public methods

Inherited methods

Method new()

Initialize a “CategoricalParameter“.

Usage
CategoricalParameter$new(values)
Arguments
values

(list or object): The possible values for the hyperparameter. This input will be converted into a list of strings.


Method as_tuning_range()

Represent the parameter range as a dicionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job.

Usage
CategoricalParameter$as_tuning_range(name)
Arguments
name

(str): The name of the hyperparameter.

Returns

dict[str, list[str]]: A dictionary that contains the name and values of the hyperparameter.


Method as_json_range()

Represent the parameter range as a dictionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job using one of the deep learning frameworks. The deep learning framework images require that hyperparameters be serialized as JSON.

Usage
CategoricalParameter$as_json_range(name)
Arguments
name

(str): The name of the hyperparameter.

Returns

dict[str, list[str]]: A dictionary that contains the name and values of the hyperparameter, where the values are serialized as JSON.


Method is_valid()

Determine if a value is valid within this CategoricalParameter

Usage
CategoricalParameter$is_valid(value)
Arguments
value

(object): Value of the hyperparameter

Returns

boolean: TRUE' or 'FALSE'


Method cast_to_type()

cast value to numeric

Usage
CategoricalParameter$cast_to_type(value)
Arguments
value

The value to be verified.


Method clone()

The objects of this class are cloneable with this method.

Usage
CategoricalParameter$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-mlcore documentation built on May 3, 2022, 10:08 a.m.