Term
Term
¶
Bases: ABC
Abstract class for linguistic terms.
The linguistic terms in this library can be divided into four groups, namely basic
, extended
, edge
, and function
.
related
Attributes¶
Functions¶
__init__
¶
__repr__
¶
__repr__() -> str
Return the code to construct the term in Python.
Returns:
Type | Description |
---|---|
str
|
code to construct the term in Python. |
__str__
¶
__str__() -> str
Return the code to construct the term in the FuzzyLite Language.
Returns:
Type | Description |
---|---|
str
|
code to construct the term in the FuzzyLite Language. |
_parameters
¶
_parse
¶
Parse the required values from the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
required |
int
|
number of values to parse |
required |
parameters |
str
|
text containing the values |
required |
height |
bool
|
whether |
True
|
Returns:
Type | Description |
---|---|
list[float]
|
list of floating-point values parsed from the parameters. |
configure
¶
configure(parameters: str) -> None
Configure the term with the parameters.
The parameters
is a list of space-separated values,
with an optional value at the end to set the height
(defaults to 1.0
if absent)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters |
str
|
space-separated parameter values to configure the term. |
required |
discretize
¶
membership
abstractmethod
¶
parameters
¶
parameters() -> str
Return the parameters of the term.
Returns:
Type | Description |
---|---|
str
|
list of space-separated parameters of the term. |
tsukamoto
¶
Compute the tsukamoto value of the monotonic term for activation degree \(y\).
Equation
\(g(y) = \{ z \in\mathbb{R} : \mu(z) = y \}\)
Warning
Raises RuntimeError
because the term does not support Tsukamoto
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
Scalar
|
activation degree |
required |
Raises:
Type | Description |
---|---|
RuntimeError
|
because the term does not support Tsukamoto |