sigmoid
sigmoid(X, left_asymptote, right_asymptote, B)
¶
Generalized logistic function for multiple variables.
\[
Y(X) = \frac{upper\_asymptote - lower\_asymptote}
{1 + \exp\left( -\sum_{i=1}^{n} B_i * X_i \right)}
+ lower\_asymptote
\]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
NDArray[float_]
|
Input data matrix (2D array). The first dimension must be a constant vector of ones. |
required |
right_asymptote |
float
|
Upper asymptote (maximum value of the curve). |
required |
left_asymptote |
float
|
Lower asymptote (minimum value of the curve). |
required |
B |
NDArray[float_] | float
|
Slope coefficients for each variable (1D array or scalar). |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
The value of the logistic function at X. |
Source code in yeastdnnexplorer/utils/sigmoid.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|