gov.sandia.cognition.statistics.distribution
Class ScalarDataDistribution.CDF
java.lang.Object
gov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.collection.AbstractScalarMap<KeyType>
gov.sandia.cognition.collection.AbstractMutableDoubleMap<KeyType>
gov.sandia.cognition.statistics.AbstractDataDistribution<KeyType>
gov.sandia.cognition.statistics.distribution.DefaultDataDistribution<Double>
gov.sandia.cognition.statistics.distribution.ScalarDataDistribution
gov.sandia.cognition.statistics.distribution.ScalarDataDistribution.CDF
- All Implemented Interfaces:
- NumericMap<Double>, ScalarMap<Double>, Evaluator<Double,Double>, ComputableDistribution<Double>, CumulativeDistributionFunction<Double>, DataDistribution<Double>, DiscreteDistribution<Double>, Distribution<Double>, DistributionWithMean<Double>, EstimableDistribution<Double,DataDistribution<Double>>, UnivariateDistribution<Double>, CloneableSerializable, Serializable, Cloneable
- Enclosing class:
- ScalarDataDistribution
public static class ScalarDataDistribution.CDF
- extends ScalarDataDistribution
- implements CumulativeDistributionFunction<Double>
CDF of the ScalarDataDistribution, maintains the keys/domain in
sorted order (TreeMap), so it's slower than it's peers.
- See Also:
- Serialized Form
| Methods inherited from class gov.sandia.cognition.statistics.AbstractDataDistribution |
fromInfiniteVector, getDomain, getDomainSize, getEntropy, getFraction, getLogFraction, getMaxValue, getMinValue, sample, sample, toInfiniteVector |
| Methods inherited from class gov.sandia.cognition.collection.AbstractScalarMap |
decrement, decrement, decrementAll, decrementAll, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, increment, incrementAll, incrementAll, isEmpty, setAll |
| Methods inherited from interface gov.sandia.cognition.collection.ScalarMap |
asMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, increment, incrementAll, incrementAll, setAll |
ScalarDataDistribution.CDF
public ScalarDataDistribution.CDF()
- Default constructor
ScalarDataDistribution.CDF
public ScalarDataDistribution.CDF(ScalarDataDistribution other)
- Copy constructor
- Parameters:
other - ScalarDataDistribution to copy
ScalarDataDistribution.CDF
public ScalarDataDistribution.CDF(Iterable<? extends Number> data)
- Creates a new instance of PMF
- Parameters:
data - Data used to create the PMF
clone
public ScalarDataDistribution.CDF clone()
- Description copied from class:
AbstractCloneableSerializable
- This makes public the clone method on the
Object 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.
- Specified by:
clone in interface DataDistribution<Double>- Specified by:
clone in interface CloneableSerializable- Overrides:
clone in class ScalarDataDistribution
- Returns:
- A clone of this object.
getMinSupport
public Double getMinSupport()
- Description copied from interface:
UnivariateDistribution
- Gets the minimum support (domain or input) of the distribution.
- Specified by:
getMinSupport in interface UnivariateDistribution<Double>- Overrides:
getMinSupport in class ScalarDataDistribution
- Returns:
- Minimum support.
getMaxSupport
public Double getMaxSupport()
- Description copied from interface:
UnivariateDistribution
- Gets the minimum support (domain or input) of the distribution.
- Specified by:
getMaxSupport in interface UnivariateDistribution<Double>- Overrides:
getMaxSupport in class ScalarDataDistribution
- Returns:
- Minimum support.
getCDF
public ScalarDataDistribution.CDF getCDF()
- Description copied from interface:
UnivariateDistribution
- Gets the CDF of a scalar distribution.
- Specified by:
getCDF in interface UnivariateDistribution<Double>- Overrides:
getCDF in class ScalarDataDistribution
- Returns:
- CDF of the scalar distribution.
evaluate
public Double evaluate(Double input)
- Description copied from interface:
Evaluator
- Evaluates the function on the given input and returns the output.
- Specified by:
evaluate in interface Evaluator<Double,Double>
- Parameters:
input - The input to evaluate.
- Returns:
- The output produced by evaluating the input.