Skip to content

Sigmoid

Sigmoid

Bases: Term

Edge Term that represents the sigmoid membership function.

Equation

\(\mu(x) = \dfrac{h}{1 + \exp(-s(x-i))}\)

where

  • \(h\): height of the Term
  • \(s\): slope of the Sigmoid
  • \(i\): inflection of the Sigmoid

Attributes

inflection instance-attribute

inflection = inflection

slope instance-attribute

slope = slope

Functions

__init__

__init__(name: str = '', inflection: float = nan, slope: float = nan, height: float = 1.0) -> None

Constructor.

Parameters:

Name Type Description Default
name str

name of the Term

''
inflection float

inflection of the Sigmoid

nan
slope float

slope of the 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

inflection slope [height].

required

is_monotonic

is_monotonic() -> bool

Return True because the term is monotonic.

Returns:

Type Description
bool

True

membership

membership(x: Scalar) -> Scalar

Compute the membership function value of \(x\).

Parameters:

Name Type Description Default
x Scalar

scalar

required

Returns:

Type Description
Scalar

\(\mu(x) = \dfrac{h}{1 + \exp(-s(x-i))}\)

parameters

parameters() -> str

Return the parameters of the term.

Returns:

Type Description
str

inflection slope [height].

tsukamoto

tsukamoto(y: Scalar) -> Scalar

Compute the tsukamoto value of the monotonic term for activation degree \(y\).

Equation

\(y=\dfrac{h}{1 + \exp(-s(x-i))}\)

\(x=i\dfrac{\log{\left(\dfrac{h}{y}-1\right)}}{-s}\)

Parameters:

Name Type Description Default
y Scalar

activation degree

required

Returns:

Type Description
Scalar

\(x=i\dfrac{\log{\left(\dfrac{h}{y}-1\right)}}{-s}\)