com.aliasi.stats
Class BernoulliConstant

java.lang.Object
  extended by com.aliasi.stats.AbstractDiscreteDistribution
      extended by com.aliasi.stats.MultivariateDistribution
          extended by com.aliasi.stats.BernoulliDistribution
              extended by com.aliasi.stats.BernoulliConstant
All Implemented Interfaces:
DiscreteDistribution

public class BernoulliConstant
extends BernoulliDistribution

A BernoulliConstant implements a Bernoulli distribution with a constant probability of success.

Since:
LingPipe2.0
Version:
2.0
Author:
Bob Carpenter

Field Summary
 
Fields inherited from class com.aliasi.stats.BernoulliDistribution
FAILURE_LABEL, SUCCESS_LABEL
 
Constructor Summary
BernoulliConstant(double successProbability)
          Construct a constant Bernoulli distribution with the specified success probability.
 
Method Summary
 double successProbability()
          Returns the constant success probability for this distribution.
 
Methods inherited from class com.aliasi.stats.BernoulliDistribution
label, maxOutcome, numDimensions, probability, variance
 
Methods inherited from class com.aliasi.stats.MultivariateDistribution
log2Probability, minOutcome, outcome, probability
 
Methods inherited from class com.aliasi.stats.AbstractDiscreteDistribution
cumulativeProbability, cumulativeProbabilityGreater, cumulativeProbabilityLess, entropy, log2Probability, mean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BernoulliConstant

public BernoulliConstant(double successProbability)
Construct a constant Bernoulli distribution with the specified success probability.

Parameters:
successProbability - Probability of success for this Bernoulli distribution.
Throws:
IllegalArgumentException - If the specified probability is not between 0.0 and 1.0 inclusive.
Method Detail

successProbability

public double successProbability()
Returns the constant success probability for this distribution.

Specified by:
successProbability in class BernoulliDistribution
Returns:
The constant success probability for this distribution.