Package jsl.utilities.statistic
Class ExceedanceEstimator
- java.lang.Object
-
- jsl.utilities.statistic.AbstractCollector
-
- jsl.utilities.statistic.ExceedanceEstimator
-
- All Implemented Interfaces:
GetNameIfc
,IdentityIfc
,ArraySaverIfc
,CollectorIfc
public class ExceedanceEstimator extends AbstractCollector
Tabulates the proportion and frequency for a random variable X > a(i) where a(i) are thresholds.
-
-
Field Summary
Fields Modifier and Type Field Description protected double[]
myCounts
Counts the number of times threshold is exceededprotected double[]
myThresholds
The thresholds for the exceedance estimatesprotected double
num
Holds the number of observations observed-
Fields inherited from interface jsl.utilities.statistic.ArraySaverIfc
DEFAULT_DATA_ARRAY_SIZE
-
-
Constructor Summary
Constructors Constructor Description ExceedanceEstimator(double... thresholds)
ExceedanceEstimator(java.lang.String name, double[] thresholds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(double x)
Collect on the supplied valuedouble[]
getFrequencies()
double
getFrequency(int i)
double
getNumberDataPointsSaved()
Gets the count of the number of the observations.double
getProportion(int i)
double[]
getProportions()
double[][]
getValueFrequencies()
double[][]
getValueProportions()
static void
main(java.lang.String[] args)
void
reset()
Resets the collector as if no observations had been collected.java.lang.String
toString()
-
Methods inherited from class jsl.utilities.statistic.AbstractCollector
clearSavedData, getId, getName, getSavedData, getSaveOption, save, save, setArraySizeIncrement, setName, setSaveOption
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jsl.utilities.statistic.CollectorIfc
collect, collect, collect
-
-
-
-
Method Detail
-
collect
public void collect(double x)
Description copied from interface:CollectorIfc
Collect on the supplied value- Parameters:
x
- a double representing the observation
-
reset
public void reset()
Description copied from interface:CollectorIfc
Resets the collector as if no observations had been collected.
-
getFrequencies
public final double[] getFrequencies()
-
getFrequency
public final double getFrequency(int i)
-
getProportion
public final double getProportion(int i)
-
getProportions
public final double[] getProportions()
-
getValueFrequencies
public final double[][] getValueFrequencies()
-
getValueProportions
public final double[][] getValueProportions()
-
getNumberDataPointsSaved
public final double getNumberDataPointsSaved()
Gets the count of the number of the observations.- Returns:
- A double representing the count
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-
-