Skip to content

SigmoidDifference

SigmoidDifference

Bases: Term

Extended Term that represents the difference between two sigmoid membership functions.

Equation

\(a = \mbox{Sigmoid}_\mbox{left}^\mbox{rise}(x)\)

\(b = \mbox{Sigmoid}_\mbox{right}^\mbox{fall}(x)\)

\(\mu(x) = h (a-b)\)

where

  • \(h\): height of the Term
  • \(\mbox{left}, \mbox{rise}\): inflection and slope of left Sigmoid
  • \(\mbox{right}, \mbox{fall}\): inflection and slope of right Sigmoid

Attributes

falling instance-attribute

falling = falling

left instance-attribute

left = left

right instance-attribute

right = right

rising instance-attribute

rising = rising

Functions

__init__

__init__(
    name: str = "",
    left: float = nan,
    rising: float = nan,
    falling: float = nan,
    right: float = nan,
    height: float = 1.0,
) -> None

Constructor.

Parameters:

Name Type Description Default
name str

name of the Term

''
left float

inflection of the left Sigmoid

nan
rising float

slope of the left Sigmoid

nan
falling float

slope of the right Sigmoid

nan
right float

inflection of the right Sigmoid

nan
height float

height of the Term.

1.0

configure

configure(parameters: str) -> None

Configure the term with the parameters.

Parameters:

Name Type Description Default
parameters str

left rising falling right [height].

required

membership

membership(x: Scalar) -> Scalar

Computes the membership function evaluated at \(x\).

Parameters:

Name Type Description Default
x Scalar

scalar

required

Returns:

Type Description
Scalar

\(\mu(x) = h (a-b)\)

parameters

parameters() -> str

Return the parameters of the term.

Returns:

Type Description
str

left rising falling right [height].