.. :html_theme.sidebar_secondary.remove:

:orphan:

:py:mod:`comyx.fading.nakagami`
===============================

.. py:module:: comyx.fading.nakagami


Module Summary
---------------

Classes
~~~~~~~

.. autoapisummary::

   comyx.fading.nakagami.Nakagami





Reference
---------

.. py:class:: Nakagami(m: float, omega: float = 1)


   Represents the :math:`\text{Nakagami}(m, \Omega)` distribution.

   The Nakagami distribution or the Nakagami-m distribution is a
   probability distribution related to the gamma distribution. The family
   of Nakagami distributions has two parameters: a shape parameter
   :math:`m` with :math:`m\geq 1/2` and a second parameter controlling
   spread :math:`\Omega > 0`.

   Density Function
       .. math::
           f(x; m, \Omega) = \frac{2m^m}{\Gamma(m)\Omega^m} x^{2m - 1} \exp\left(-\frac{m}{\Omega}x^2\right)

   , where :math:`\Gamma(.)` is the gamma function.

   Expected value
       .. math::
           \sqrt{\frac{\Omega}{m}} \frac{\Gamma\left(m + \frac{1}{2}\right)}{\Gamma(m)}


   Variance
       .. math::
           \Omega \left(1 - \frac{1}{m}\left(\frac{\Gamma\left(m + \frac{1}{2}\right)}{\Gamma(m)}\right)^2\right)

   Reference:
       https://en.wikipedia.org/wiki/Nakagami_distribution

   .. py:method:: cdf(x: NDArrayFloat) -> NDArrayFloat

      Cumulative distribution function of the Nakagami distribution.

      :param x: Value at which cdf is evaluated.

      :returns: Value of the cumulative distribution function evaluated at x.


   .. py:method:: expected_value() -> float

      Returns the expected value of the Nakagami distribution.


   .. py:method:: get_samples(size: Union[int, Tuple[int, Ellipsis]], seed: int = None) -> NDArrayFloat

      Generate random variables from the Nakagami distribution.

      :param size: Number of random variables to generate.
      :param seed: Seed for the random number generator.

      :returns: An array of size `size` containing random variables from the
                Nakagami distribution.


   .. py:method:: pdf(x: NDArrayFloat) -> NDArrayFloat

      Probability density function of the Nakagami distribution.

      :param x: Value at which pdf is evaluated.

      :returns: Value of the probability density function evaluated at x.


   .. py:method:: variance() -> float

      Returns the variance of the Nakagami distribution.



