Skip to content

Activated

Activated

Bases: Term

Special term that represents the activation of terms when processing the antecedent of a rule.

Equation

\(\mu(x) = \alpha_a \otimes \mu_a(x)\)

where

  • \(\alpha_a\): activation degree of term \(a\)
  • \(\otimes\): implication operator
  • \(\mu_a\): activated term \(a\)
related

Attributes

degree property writable

degree: Scalar

Get/Set the activation degree of the term.

Getter

Returns:

Type Description
Scalar

activation degree of the term.

Setter

Parameters:

Name Type Description Default
value Scalar

activation degree of the term, with replacements of {nan: 0.0, -inf: 0.0, inf: 1.0}

required
Note

replacements of {nan: 0.0, -inf: 0.0, inf: 1.0} are made to sensibly deal with non-finite activations (eg, NaN input values)

implication instance-attribute

implication = implication

term instance-attribute

term = term

Functions

__init__

__init__(term: Term, degree: Scalar = 1.0, implication: TNorm | None = None) -> None

Constructor.

Parameters:

Name Type Description Default
term Term

activated term

required
degree Scalar

activation degree of the term

1.0
implication TNorm | None

implication operator

None

__repr__

__repr__() -> str

Return the code to construct the term in Python.

Returns:

Type Description
str

code to construct the term in Python.

fuzzy_value

fuzzy_value(padding: bool = False) -> Array[str_]

Return fuzzy value in the form {degree}/{name}.

Parameters:

Name Type Description Default
padding bool

whether to pad the degree sign (eg, " - " when True and "-" otherwise)

False

Returns:

Type Description
Array[str_]

fuzzy value in the form {degree}/{name}

membership

membership(x: Scalar) -> Scalar

Compute the implication of the activation degree and the membership function value of \(x\).

Parameters:

Name Type Description Default
x Scalar

scalar

required

Returns:

Type Description
Scalar

\(\mu(x) = \alpha_a \otimes \mu_a(x)\)

parameters

parameters() -> str

Return the space-separated parameters of the term.

Returns:

Type Description
str

degree * term if not implication else implication(degree, term)