@@ -425,6 +425,12 @@ def logistic_saturation(x, lam: npt.NDArray | float = 0.5):
425
425
.. math::
426
426
f(x) = \frac{1 - e^{-\lambda x}}{1 + e^{-\lambda x}}
427
427
428
+ The logistic saturation function reaches the half-saturation point at
429
+ :math:`x = \frac{ln(3)}{\lambda}`. This means the half-saturation point
430
+ is approximately :math:`1/\lambda`. If you want to set a prior on the
431
+ exact half-saturation point, you can use the inverse_scaled_logistic_saturation
432
+ function, available in this package.
433
+
428
434
.. plot::
429
435
:context: close-figs
430
436
@@ -451,7 +457,8 @@ def logistic_saturation(x, lam: npt.NDArray | float = 0.5):
451
457
x : tensor
452
458
Input tensor.
453
459
lam : float or array-like, optional, by default 0.5
454
- Saturation parameter.
460
+ Represents the efficiency of the channel.
461
+ Larger values represent a more efficient channel.
455
462
456
463
Returns
457
464
-------
@@ -500,7 +507,7 @@ def inverse_scaled_logistic_saturation(
500
507
x : tensor
501
508
Input tensor.
502
509
lam : float or array-like, optional, by default 0.5
503
- Saturation parameter .
510
+ The half-saturation point. Larger values represent less efficient channels .
504
511
eps : float or array-like, optional, by default ln(3)
505
512
Scaling parameter. ln(3) results in halfway saturation at lam
506
513
@@ -595,6 +602,13 @@ def tanh_saturation(
595
602
.. math::
596
603
f(x) = b \tanh \left( \frac{x}{bc} \right)
597
604
605
+ The tanh saturation function has a nice property that is useful when
606
+ setting priors. The slope of the function when x is zero is
607
+ :math:`\frac{1}{c}`. This means that you can set a prior by considering
608
+ how many units of media are required to acquire the first customer. Unlike most
609
+ other saturation functions, the slope at 0 is independent of the saturation
610
+ point.
611
+
598
612
.. plot::
599
613
:context: close-figs
600
614
@@ -628,9 +642,12 @@ def tanh_saturation(
628
642
x : tensor
629
643
Input tensor.
630
644
b : float, by default 0.5
631
- Number of users at saturation. Must be non-negative.
645
+ The saturation point. It represents the maximium number of
646
+ customers that could be acquired through this channel at any
647
+ point time. Must be non-negative.
632
648
c : float, by default 0.5
633
- Initial cost per user. Must be non-zero.
649
+ Initial cost per user. Larger values represent less efficient channels.
650
+ Must be non-zero.
634
651
635
652
Returns
636
653
-------
@@ -804,17 +821,13 @@ def michaelis_menten(
804
821
) -> float | Any :
805
822
r"""Evaluate the Michaelis-Menten function for given values of x, alpha, and lambda.
806
823
807
- The Michaelis-Menten function models enzyme kinetics and describes how the rate of
808
- a chemical reaction increases with substrate concentration until it reaches its
809
- maximum value.
810
-
811
824
.. math::
812
825
\alpha \cdot \frac{x}{\lambda + x}
813
826
814
827
where:
815
- - :math:`x`: Channel spend or substrate concentration .
816
- - :math:`\alpha`: Maximum contribution or efficiency factor .
817
- - :math:`\lambda` (k): Michaelis constant, representing the threshold substrate concentration .
828
+ - :math:`x`: Channel spend.
829
+ - :math:`\alpha`: Maximum contribution.
830
+ - :math:`\lambda` (k): The half-saturation point .
818
831
819
832
.. plot::
820
833
:context: close-figs
@@ -872,9 +885,11 @@ def michaelis_menten(
872
885
x : float
873
886
The spent on a channel.
874
887
alpha : float
875
- The maximum contribution a channel can make.
888
+ The saturation point. It represents the maximium number of
889
+ customers that could be acquired through this channel at any
890
+ point time. Must be non-negative.
876
891
lam : float
877
- The Michaelis constant for the given enzyme-substrate system .
892
+ The half-saturation point. Larger values represent less efficient channels .
878
893
879
894
Returns
880
895
-------
@@ -940,7 +955,7 @@ def hill_function(
940
955
The independent variable, typically representing the concentration of a
941
956
substrate or the intensity of a stimulus.
942
957
slope : float
943
- The slope of the hill. Must pe non-positive.
958
+ The slope of the hill. Must be non-positive.
944
959
kappa : float
945
960
The half-saturation point as :math:`f(\kappa) = 0.5` for any value of :math:`s` and :math:`\kappa`.
946
961
0 commit comments