|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Number>
gov.sandia.cognition.statistics.distribution.PoissonDistribution
@PublicationReference(author="Wikipedia",
title="Poisson distribution",
type=WebPage,
year=2009,
url="http://en.wikipedia.org/wiki/Poisson_distribution")
public class PoissonDistributionA Poisson distribution is the limits of what happens when a Bernoulli trial with "rare" events are sampled on a continuous basis and then binned into discrete time intervals. For example, if two people buy a house every day, then what is the probability that ten people buy a house on some day?
| Nested Class Summary | |
|---|---|
static class |
PoissonDistribution.CDF
CDF of the PoissonDistribution |
static class |
PoissonDistribution.MaximumLikelihoodEstimator
Creates a PoissonDistribution from data |
static class |
PoissonDistribution.PMF
PMF of the PoissonDistribution. |
| Field Summary | |
|---|---|
static double |
DEFAULT_RATE
Default rate parameter, 1.0. |
protected double |
rate
Expected number of occurrences during the integer interval, must be greater than zero. |
| Constructor Summary | |
|---|---|
PoissonDistribution()
Creates a new instance of PoissonDistribution |
|
PoissonDistribution(double rate)
Creates a new instance of PoissonDistribution |
|
PoissonDistribution(PoissonDistribution other)
Creates a new instance of PoissonDistribution |
|
| Method Summary | |
|---|---|
PoissonDistribution |
clone()
This makes public the clone method on the Object class and
removes the exception that it throws. |
void |
convertFromVector(Vector parameters)
Converts the object from a Vector of parameters. |
Vector |
convertToVector()
Converts the object to a vector. |
PoissonDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution. |
IntegerSpan |
getDomain()
Returns an object that allows an iteration through the domain (x-axis, independent variable) of the Distribution |
int |
getDomainSize()
Gets the size of the domain. |
PoissonDistribution.MaximumLikelihoodEstimator |
getEstimator()
Gets an estimator associated with this distribution. |
Integer |
getMaxSupport()
Gets the minimum support (domain or input) of the distribution. |
Double |
getMean()
Gets the arithmetic mean, or "first central moment" or "expectation", of the distribution. |
Integer |
getMinSupport()
Gets the minimum support (domain or input) of the distribution. |
PoissonDistribution.PMF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution, either the PDF or PMF. |
double |
getRate()
Getter for rate |
double |
getVariance()
Gets the variance of the distribution. |
ArrayList<Number> |
sample(Random random,
int numSamples)
Draws multiple random samples from the distribution. |
void |
setRate(double rate)
Setter for rate |
| Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution |
|---|
sample |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.sandia.cognition.statistics.Distribution |
|---|
sample |
| Field Detail |
|---|
public static final double DEFAULT_RATE
protected double rate
| Constructor Detail |
|---|
public PoissonDistribution()
public PoissonDistribution(double rate)
rate - Expected number of occurrences during the integer interval, must be
greater than zero.public PoissonDistribution(PoissonDistribution other)
other - PoissonDistribution to copy.| Method Detail |
|---|
public PoissonDistribution clone()
AbstractCloneableSerializableObject class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone() to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone() as the basis for your implementation.
clone in interface Vectorizableclone in interface CloneableSerializableclone in class AbstractClosedFormUnivariateDistribution<Number>public Double getMean()
DistributionWithMean
getMean in interface DistributionWithMean<Number>
public ArrayList<Number> sample(Random random,
int numSamples)
Distribution
sample in interface Distribution<Number>random - Random-number generator to use in order to generate random numbers.numSamples - Number of samples to draw from the distribution.
public PoissonDistribution.CDF getCDF()
UnivariateDistribution
getCDF in interface ClosedFormUnivariateDistribution<Number>getCDF in interface UnivariateDistribution<Number>public Vector convertToVector()
Vectorizable
convertToVector in interface Vectorizablepublic void convertFromVector(Vector parameters)
Vectorizable
convertFromVector in interface Vectorizableparameters - The parameters to incorporate.public double getVariance()
UnivariateDistribution
getVariance in interface UnivariateDistribution<Number>public IntegerSpan getDomain()
DiscreteDistribution
getDomain in interface DiscreteDistribution<Number>public int getDomainSize()
DiscreteDistribution
getDomainSize in interface DiscreteDistribution<Number>public PoissonDistribution.PMF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction in interface ComputableDistribution<Number>getProbabilityFunction in interface DiscreteDistribution<Number>public double getRate()
public void setRate(double rate)
rate - Expected number of occurrences during the integer interval, must be
greater than zero.public Integer getMinSupport()
UnivariateDistribution
getMinSupport in interface UnivariateDistribution<Number>public Integer getMaxSupport()
UnivariateDistribution
getMaxSupport in interface UnivariateDistribution<Number>public PoissonDistribution.MaximumLikelihoodEstimator getEstimator()
EstimableDistribution
getEstimator in interface EstimableDistribution<Number,PoissonDistribution>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||