public class ScalarDataDistribution extends DefaultDataDistribution<java.lang.Double> implements UnivariateDistribution<java.lang.Double>
| Modifier and Type | Class and Description |
|---|---|
static class |
ScalarDataDistribution.CDF
CDF of the ScalarDataDistribution, maintains the keys/domain in
sorted order (TreeMap), so it's slower than it's peers.
|
static class |
ScalarDataDistribution.Estimator
Estimator for a ScalarDataDistribution
|
static class |
ScalarDataDistribution.PMF
PMF of the ScalarDataDistribution
|
DefaultDataDistribution.DefaultFactory<DataType>, DefaultDataDistribution.WeightedEstimator<KeyType>AbstractMutableDoubleMap.Entry<KeyType>, AbstractMutableDoubleMap.SimpleEntry<KeyType>, AbstractMutableDoubleMap.SimpleEntrySet<KeyType>, AbstractMutableDoubleMap.SimpleIterator<KeyType>ScalarMap.Entry<KeyType>DEFAULT_INITIAL_CAPACITY, totalmap| Modifier | Constructor and Description |
|---|---|
|
ScalarDataDistribution()
Creates a new instance of ScalarDataDistribution
|
|
ScalarDataDistribution(java.lang.Iterable<? extends java.lang.Number> data)
Creates a new instance of ScalarDataDistribution
|
protected |
ScalarDataDistribution(java.util.Map<java.lang.Double,MutableDouble> map,
double total)
Creates a new instance of ScalarDataDistribution
|
|
ScalarDataDistribution(ScalarDataDistribution other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
ScalarDataDistribution |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
ScalarDataDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution.
|
ScalarDataDistribution.Estimator |
getEstimator()
Gets an estimator associated with this distribution.
|
java.lang.Double |
getMaxSupport()
Gets the minimum support (domain or input) of the distribution.
|
java.lang.Double |
getMean()
Gets the arithmetic mean, or "first central moment" or "expectation",
of the distribution.
|
double |
getMeanAsDouble()
Gets the mean of the distribution as a double.
|
java.lang.Double |
getMinSupport()
Gets the minimum support (domain or input) of the distribution.
|
ScalarDataDistribution.PMF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
double |
getVariance()
Gets the variance of the distribution.
|
clear, getMeanValue, getTotal, increment, setfromInfiniteVector, getDomain, getDomainSize, getEntropy, getFraction, getLogFraction, getMaxValue, getMinValue, sample, sample, sampleInto, toInfiniteVectorasMap, compact, entrySet, getcontainsKey, decrement, decrement, decrementAll, decrementAll, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, increment, incrementAll, incrementAll, isEmpty, keySet, setAll, setAll, sizeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsample, sample, sampleIntoasMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, increment, incrementAll, incrementAll, setAll, setAllcontainsKey, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, isEmpty, keySet, sizepublic ScalarDataDistribution()
public ScalarDataDistribution(ScalarDataDistribution other)
other - ScalarDataDistribution to copypublic ScalarDataDistribution(java.lang.Iterable<? extends java.lang.Number> data)
data - Data to create the distributionprotected ScalarDataDistribution(java.util.Map<java.lang.Double,MutableDouble> map, double total)
map - total - public ScalarDataDistribution 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 DataDistribution<java.lang.Double>clone in interface CloneableSerializableclone in class DefaultDataDistribution<java.lang.Double>public ScalarDataDistribution.PMF getProbabilityFunction()
ComputableDistributiongetProbabilityFunction in interface ComputableDistribution<java.lang.Double>getProbabilityFunction in interface DataDistribution<java.lang.Double>getProbabilityFunction in interface DiscreteDistribution<java.lang.Double>getProbabilityFunction in class DefaultDataDistribution<java.lang.Double>public java.lang.Double getMean()
DistributionWithMeangetMean in interface DistributionWithMean<java.lang.Double>public double getMeanAsDouble()
UnivariateDistributiongetMeanAsDouble in interface UnivariateDistribution<java.lang.Double>public ScalarDataDistribution.Estimator getEstimator()
EstimableDistributiongetEstimator in interface DataDistribution<java.lang.Double>getEstimator in interface EstimableDistribution<java.lang.Double,DataDistribution<java.lang.Double>>getEstimator in class DefaultDataDistribution<java.lang.Double>public java.lang.Double getMinSupport()
UnivariateDistributiongetMinSupport in interface UnivariateDistribution<java.lang.Double>public java.lang.Double getMaxSupport()
UnivariateDistributiongetMaxSupport in interface UnivariateDistribution<java.lang.Double>public ScalarDataDistribution.CDF getCDF()
UnivariateDistributiongetCDF in interface UnivariateDistribution<java.lang.Double>@PublicationReference(title="Algorithms for calculating variance", type=WebPage, year=2010, author="Wikipedia", url="http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance") public double getVariance()
UnivariateDistributiongetVariance in interface UnivariateDistribution<java.lang.Double>