Skip to content

GaussianProduct

GaussianProduct

Bases: Term

Extended term that represents the two-sided gaussian membership function.

Equation

\(a = \begin{cases} \mbox{Gaussian}^{\mu_a}_{\sigma_a}(x) & \mbox{if } x < \mu_a \cr 1.0 & \mbox{otherwise} \cr \end{cases}\)

\(b = \begin{cases} \mbox{Gaussian}^{\mu_b}_{\sigma_b}(x) & \mbox{if } x > \mu_b \cr 1.0 & \mbox{otherwise} \cr \end{cases}\)

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

where

  • \(h\): height of the Term
  • \(\mu_a, \sigma_a\): mean and standard deviation of the first Gaussian
  • \(\mu_b, \sigma_b\): mean and standard deviation of the second Gaussian

Attributes

mean_a instance-attribute

mean_a = mean_a

mean_b instance-attribute

mean_b = mean_b

standard_deviation_a instance-attribute

standard_deviation_a = standard_deviation_a

standard_deviation_b instance-attribute

standard_deviation_b = standard_deviation_b

Functions

__init__

__init__(
    name: str = "",
    mean_a: float = nan,
    standard_deviation_a: float = nan,
    mean_b: float = nan,
    standard_deviation_b: float = nan,
    height: float = 1.0,
) -> None

Constructor.

Parameters:

Name Type Description Default
name str

name of the Term

''
mean_a float

mean of the first Gaussian

nan
standard_deviation_a float

standard deviation of the first Gaussian

nan
mean_b float

mean of the second Gaussian

nan
standard_deviation_b float

standard deviation of the second Gaussian

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

mean_a standard_deviation_a mean_b standard_deviation_b [height].

required

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) = h (a \times b)\)

parameters

parameters() -> str

Return the space-separated parameters of the term.

Returns:

Type Description
str

mean_a standard_deviation_a mean_b standard_deviation_b [height].