C# Класс NSoft.NFramework.Numerics.Distributions.Discrete.ConwayMaxwellPoisson

The Conway-Maxwell-Poisson distribution is a generalization of the Poisson, Geometric and Bernoulli distributions. It is parameterized by two real numbers "lambda" and "nu". For nu = 0 the distribution reverts to a Geometric distribution nu = 1 the distribution reverts to the Poisson distribution nu -> infinity the distribution converges to a Bernoulli distribution

This implementation will cache the value of the normalization constant. Wikipedia - ConwayMaxwellPoisson distribution.

The distribution will use the System.Random by default. Users can set the random number generator by using the RandomSource property.

The statistics classes will check all the incoming parameters whether they are in the allowed range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters to false, all parameter checks can be turned off.

Наследование: IDiscreteDistribution
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
AssertParameters void
CalcMean double
CalcVariance double
DoSamples IEnumerable
Normalization double
SetParameters void

Открытые методы

Метод Описание
ConwayMaxwellPoisson ( double lambda, double nu, Func randomFactory = null ) : System

Initializes a new instance of the ConwayMaxwellPoisson class.

CumulativeDistribution ( double x ) : double

확률 분포 계산을 위한 누적분포함수

Probability ( int k ) : double

분포의 확률

ProbabilityLn ( int k ) : double

분포의 Log 확률

Sample ( ) : int

분포의 데이타를 반환합니다.

Samples ( ) : IEnumerable

분포의 무작위 데이타를 열거합니다.

ToString ( ) : string

Приватные методы

Метод Описание
AssertParameters ( double lambda, double nu ) : void
CalcMean ( double lambda, double nu ) : double
CalcVariance ( double lambda, double nu, double mean ) : double
DoSamples ( Random rnd, double lambda, double nu, double z ) : IEnumerable

Returns one trials from the distribution.

Normalization ( double lambda, double nu ) : double

Computes an approximate normalization constant for the CMP distribution.

SetParameters ( double lambda, double nu ) : void

Sets the parameters of the distribution after checking their validity.

Описание методов

ConwayMaxwellPoisson() публичный Метод

Initializes a new instance of the ConwayMaxwellPoisson class.
public ConwayMaxwellPoisson ( double lambda, double nu, Func randomFactory = null ) : System
lambda double
nu double
randomFactory Func
Результат System

CumulativeDistribution() публичный Метод

확률 분포 계산을 위한 누적분포함수
public CumulativeDistribution ( double x ) : double
x double The location at which to compute the cumulative distribution function.
Результат double

Probability() публичный Метод

분포의 확률
public Probability ( int k ) : double
k int
Результат double

ProbabilityLn() публичный Метод

분포의 Log 확률
public ProbabilityLn ( int k ) : double
k int
Результат double

Sample() публичный Метод

분포의 데이타를 반환합니다.
public Sample ( ) : int
Результат int

Samples() публичный Метод

분포의 무작위 데이타를 열거합니다.
public Samples ( ) : IEnumerable
Результат IEnumerable

ToString() публичный Метод

public ToString ( ) : string
Результат string