Linear
Linear
¶
Bases: Term
Linear polynomial term.
Equation
\(\mu(x)= \mathbf{c}\mathbf{v}+k = \sum_i c_iv_i + k\)
where
- \(x\): irrelevant
- \(\mathbf{v}\): vector of values from the input variables
- \(\mathbf{c}\) vector of coefficients for the input variables
- \(k\) is a constant
Attributes¶
Functions¶
__init__
¶
__repr__
¶
__repr__() -> str
Return the code to construct the term in Python.
Returns:
Type | Description |
---|---|
str
|
code to construct the term in Python. |
configure
¶
configure(parameters: str) -> None
Configure the term with the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters |
str
|
coefficients |
required |
membership
¶
Compute the membership function evaluated at \(x\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Scalar
|
scalar |
required |
Returns:
Type | Description |
---|---|
Scalar
|
\(\mu(x)=\sum_i c_iv_i + k\) |
Raises:
Type | Description |
---|---|
ValueError
|
when the number of coefficients (+1) is different from the number of input variables |