Threshold
Threshold
¶
Bases: Activation
Activation method that activates the rules whose activation degrees satisfy the comparison operator and the threshold, and deactivates the rest.
related
Attributes¶
Classes¶
Comparator
¶
Bases: Enum
Six comparison operators between the activation degree \(a\) and the threshold \(\theta\).
Attributes¶
__operator__
class-attribute
instance-attribute
¶
__operator__: dict[str, Callable[[Scalar, Scalar], bool | Array[bool_]]] = {
LessThan: lt,
LessThanOrEqualTo: le,
EqualTo: eq,
NotEqualTo: ne,
GreaterThanOrEqualTo: ge,
GreaterThan: gt,
}
operator
property
¶
Functions¶
Functions¶
__init__
¶
__init__(comparator: Comparator | str = Comparator.GreaterThan, threshold: float = 0.0) -> None
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
comparator |
Comparator | str
|
comparison operator |
GreaterThan
|
threshold |
float
|
value for activation degrees. |
0.0
|
activate
¶
activate(rule_block: RuleBlock) -> None
Activates the rules whose activation degrees satisfy the comparator and threshold, and deactivate the rest.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rule_block |
RuleBlock
|
rule block to activate. |
required |