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.
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
Maximum parameter value (nc-1)
Minimum parameter value (always 0 for discrete)
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