Param_Discrete#

class obsidian.parameters.discrete.Param_Discrete(name: str, categories: str | list[str], search_categories: list[str] | None = None)[source]#

Bases: Parameter

Represents a discrete parameter.

name#

The name of the parameter.

Type:

str

categories#

The categories of the parameter.

Type:

list[str]

Properties:

min (int): The minimum value of the parameter (always 0). nc (int): The number of categories. max (int): The maximum value of the parameter (nc - 1).

__init__(name: str, categories: str | list[str], search_categories: list[str] | None = None)[source]#

Methods

__init__(name, categories[, search_categories])

decode()

Decode parameter from transformed space

encode()

Encode parameter to a format that can be used for training

load_state(obj_dict)

Load the state of the Parameter object from a dictionary.

open_search()

Set the search space to the parameter space

save_state()

Save the state of the Parameter object.

set_search(search_categories)

Set the search space for the parameter

unit_demap(X)

unit_map(X)

Attributes

max

Maximum parameter value (nc-1)

min

Minimum parameter value (always 0 for discrete)

nc

Number of discrete categories

property max#

Maximum parameter value (nc-1)

property min#

Minimum parameter value (always 0 for discrete)

property nc#

Number of discrete categories

Set the search space to the parameter space

Set the search space for the parameter

Parameters:

search_categories (list[str]) – The search space for the parameter.