Click or drag to resize
Accord.NET (logo) NakagamiDistribution Class
Nakagami distribution.
Inheritance Hierarchy
SystemObject
  Accord.Statistics.DistributionsDistributionBase
    Accord.Statistics.Distributions.UnivariateUnivariateContinuousDistribution
      Accord.Statistics.Distributions.UnivariateNakagamiDistribution

Namespace:  Accord.Statistics.Distributions.Univariate
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.4.0
Syntax
[SerializableAttribute]
public class NakagamiDistribution : UnivariateContinuousDistribution, 
	ISampleableDistribution<double>, IDistribution<double>, IDistribution, 
	ICloneable, IRandomNumberGenerator<double>, IFormattable
Request Example View Source

The NakagamiDistribution type exposes the following members.

Constructors
  NameDescription
Public methodNakagamiDistribution
Initializes a new instance of the NakagamiDistribution class.
Top
Properties
  NameDescription
Public propertyEntropy
This method is not supported.
(Overrides UnivariateContinuousDistributionEntropy.)
Public propertyMean
Gets the mean for this distribution.
(Overrides UnivariateContinuousDistributionMean.)
Public propertyMedian
Gets the median for this distribution.
(Inherited from UnivariateContinuousDistribution.)
Public propertyMode
Gets the mode for this distribution.
(Overrides UnivariateContinuousDistributionMode.)
Public propertyQuartiles
Gets the Quartiles for this distribution.
(Inherited from UnivariateContinuousDistribution.)
Public propertyShape
Gets the distribution's shape parameter μ (mu).
Public propertySpread
Gets the distribution's spread parameter ω (omega).
Public propertyStandardDeviation
Gets the Standard Deviation (the square root of the variance) for the current distribution.
(Inherited from UnivariateContinuousDistribution.)
Public propertySupport
Gets the support interval for this distribution.
(Overrides UnivariateContinuousDistributionSupport.)
Public propertyVariance
Gets the variance for this distribution.
(Overrides UnivariateContinuousDistributionVariance.)
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
(Overrides DistributionBaseClone.)
Public methodComplementaryDistributionFunction
Gets the complementary cumulative distribution function (ccdf) for this distribution evaluated at point x. This function is also known as the Survival function.
(Inherited from UnivariateContinuousDistribution.)
Public methodCumulativeHazardFunction
Gets the cumulative hazard function for this distribution evaluated at point x.
(Inherited from UnivariateContinuousDistribution.)
Public methodCode exampleDistributionFunction(Double)
Gets the cumulative distribution function (cdf) for this distribution evaluated at point x.
(Overrides UnivariateContinuousDistributionDistributionFunction(Double).)
Public methodDistributionFunction(Double, Double)
Gets the cumulative distribution function (cdf) for this distribution in the semi-closed interval (a; b] given as P(a < X ≤ b).
(Inherited from UnivariateContinuousDistribution.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberEstimate(Double)
Estimates a new Nakagami distribution from a given set of observations.
Public methodStatic memberEstimate(Double, Double)
Estimates a new Nakagami distribution from a given set of observations.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFit(Double)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, IFittingOptions)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, Double)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, Int32)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, Double, IFittingOptions)
Fits the underlying distribution to a given set of observations.
(Overrides UnivariateContinuousDistributionFit(Double, Double, IFittingOptions).)
Public methodFit(Double, Int32, IFittingOptions)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodGenerate
Generates a random observation from the current distribution.
(Overrides UnivariateContinuousDistributionGenerate.)
Public methodGenerate(Int32)
Generates a random vector of observations from the current distribution.
(Inherited from UnivariateContinuousDistribution.)
Public methodGenerate(Int32, Double)
Generates a random vector of observations from the current distribution.
(Overrides UnivariateContinuousDistributionGenerate(Int32, Double).)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRange
Gets the distribution range within a given percentile.
(Inherited from UnivariateContinuousDistribution.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHazardFunction
Gets the hazard function, also known as the failure rate or the conditional failure density function for this distribution evaluated at point x.
(Inherited from UnivariateContinuousDistribution.)
Public methodInverseDistributionFunction
Gets the inverse of the cumulative distribution function (icdf) for this distribution evaluated at probability p. This function is also known as the Quantile function.
(Inherited from UnivariateContinuousDistribution.)
Public methodLogCumulativeHazardFunction
Gets the log of the cumulative hazard function for this distribution evaluated at point x.
(Inherited from UnivariateContinuousDistribution.)
Public methodCode exampleLogProbabilityDensityFunction
Gets the log-probability density function (pdf) for this distribution evaluated at point x.
(Overrides UnivariateContinuousDistributionLogProbabilityDensityFunction(Double).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodCode exampleProbabilityDensityFunction
Gets the probability density function (pdf) for this distribution evaluated at point x.
(Overrides UnivariateContinuousDistributionProbabilityDensityFunction(Double).)
Public methodQuantileDensityFunction
Gets the first derivative of the inverse distribution function (icdf) for this distribution evaluated at probability p.
(Inherited from UnivariateContinuousDistribution.)
Public methodStatic memberRandom(Double, Double)
Generates a random observation from the Nakagami distribution with the given parameters.
Public methodStatic memberRandom(Double, Double, Int32)
Generates a random vector of observations from the Nakagami distribution with the given parameters.
Public methodStatic memberRandom(Double, Double, Int32, Double)
Generates a random vector of observations from the Nakagami distribution with the given parameters.
Public methodToString
Returns a String that represents this instance.
(Inherited from DistributionBase.)
Public methodToString(IFormatProvider)
Returns a String that represents this instance.
(Inherited from DistributionBase.)
Public methodToString(String)
Returns a String that represents this instance.
(Inherited from DistributionBase.)
Public methodToString(String, IFormatProvider)
Returns a String that represents this instance.
(Overrides DistributionBaseToString(String, IFormatProvider).)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by Matrix.)
Top
Remarks

The Nakagami distribution has been used in the modeling of wireless signal attenuation while traversing multiple paths.

References:

Examples
var nakagami = new NakagamiDistribution(shape: 2.4, spread: 4.2);

double mean = nakagami.Mean;     // 1.946082119049118
double median = nakagami.Median; // 1.9061151110206338
double var = nakagami.Variance;  // 0.41276438591729486

double cdf = nakagami.DistributionFunction(x: 1.4); // 0.20603416752368109
double pdf = nakagami.ProbabilityDensityFunction(x: 1.4); // 0.49253215371343023
double lpdf = nakagami.LogProbabilityDensityFunction(x: 1.4); // -0.708195533773302

double ccdf = nakagami.ComplementaryDistributionFunction(x: 1.4); // 0.79396583247631891
double icdf = nakagami.InverseDistributionFunction(p: cdf); // 1.400000000131993

double hf = nakagami.HazardFunction(x: 1.4); // 0.62034426869133652
double chf = nakagami.CumulativeHazardFunction(x: 1.4); // 0.23071485080660473

string str = nakagami.ToString(CultureInfo.InvariantCulture); // Nakagami(x; μ = 2,4, ω = 4,2)"
See Also