discrete#
Parameters that can only be sampled at specific values
Classes
|
Represents an categorical parameter; a discrete parameter without an order. |
|
Represents a discrete parameter. |
|
Represents an discrete numeric parameter; an ordinal parameter comprised of numbers. |
|
Represents an ordinal parameter; a discrete parameter with an order. |
|
Represents an task parameter; a discrete parameter indicating a distinct system. |
- class obsidian.parameters.discrete.Param_Categorical(name: str, categories: str | list[str], search_categories: list[str] | None = None)[source]#
Bases:
Param_Discrete
Represents an categorical parameter; a discrete parameter without an order.
- 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).
- property max#
Maximum parameter value (nc-1)
- property min#
Minimum parameter value (always 0 for discrete)
- property nc#
Number of discrete categories
- class obsidian.parameters.discrete.Param_Discrete_Numeric(name, categories: list[int | float], search_categories: list[int | float] | None = None)[source]#
Bases:
Param_Discrete
Represents an discrete numeric parameter; an ordinal parameter comprised of numbers.
- Raises:
TypeError – If the categories are not numbers.
TypeError – If the categories are not a list of numbers.
- decode(X)#
Decode parameter from transformed space
- encode(X)#
Encode parameter to a format that can be used for training
- property max#
Maximum parameter value
- property min#
Minimum parameter value
- property range#
The range of the parameter (max - min)
- class obsidian.parameters.discrete.Param_Ordinal(name: str, categories: str | list[str], search_categories: list[str] | None = None)[source]#
Bases:
Param_Discrete
Represents an ordinal parameter; a discrete parameter with an order.
- class obsidian.parameters.discrete.Task(name: str, categories: str | list[str], search_categories: list[str] | None = None)[source]#
Bases:
Param_Discrete
Represents an task parameter; a discrete parameter indicating a distinct system.
- decode(X)#
Decode parameter from transformed space
- encode(X)#
Encode parameter to a format that can be used for training