SShape
SShape
¶
Bases: Term
Edge Term that represents the S-shaped membership function.
Equation:
\(\mu(x) = \begin{cases} 0 & \mbox{if } x \leq s \cr 2h \left(\dfrac{x - s}{e-s}\right)^2 & \mbox{if } s < x \leq \dfrac{s+e}{2}\cr h - 2h\left(\dfrac{x - e}{e-s}\right)^2 & \mbox{if } \dfrac{s+e}{2} < x < e\cr h & \mbox{otherwise} \end{cases}\)
where
- \(h\): height of the Term
- \(s\): start of the SShape
- \(e\): end of the SShape
Attributes¶
Functions¶
__init__
¶
configure
¶
configure(parameters: str) -> None
Configure the term with the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters |
str
|
|
required |
membership
¶
Computes the membership function evaluated at \(x\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Scalar
|
scalar |
required |
Returns:
Type | Description |
---|---|
Scalar
|
\(\mu(x) = \begin{cases} 0 & \mbox{if } x \leq s \cr 2h \left(\dfrac{x - s}{e-s}\right)^2 & \mbox{if } s < x \leq \dfrac{s+e}{2}\cr h - 2h\left(\dfrac{x - e}{e-s}\right)^2 & \mbox{if } \dfrac{s+e}{2} < x < e\cr h & \mbox{otherwise} \end{cases}\) |
tsukamoto
¶
Compute the tsukamoto value of the monotonic term for activation degree \(y\).
Equation
\(y = \begin{cases} 0 & \mbox{if } x \leq s \cr 2h \left(\dfrac{x - s}{e-s}\right)^2 & \mbox{if } s < x \leq \dfrac{s+e}{2}\cr h - 2h\left(\dfrac{x - e}{e-s}\right)^2 & \mbox{if } \dfrac{s+e}{2} < x < e\cr h & \mbox{otherwise} \end{cases}\)
\(x = \begin{cases} s + (e-s) \sqrt{\dfrac{y}{2h}} & \mbox{if } y \le \dfrac{h}{2} \cr e - (e-s) \sqrt{\dfrac{h-y}{2h}} & \mbox{otherwise} \end{cases}\)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
Scalar
|
activation degree |
required |
Returns:
Type | Description |
---|---|
Scalar
|
\(x = \begin{cases} s + (e-s) \sqrt{\dfrac{y}{2h}} & \mbox{if } y \le \dfrac{h}{2} \cr e - (e-s) \sqrt{\dfrac{h-y}{2h}} & \mbox{otherwise} \end{cases}\) |