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[]myCountsCounts the number of times threshold is exceededprotected double[]myThresholdsThe thresholds for the exceedance estimatesprotected doublenumHolds 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 voidcollect(double x)Collect on the supplied valuedouble[]getFrequencies()doublegetFrequency(int i)doublegetNumberDataPointsSaved()Gets the count of the number of the observations.doublegetProportion(int i)double[]getProportions()double[][]getValueFrequencies()double[][]getValueProportions()static voidmain(java.lang.String[] args)voidreset()Resets the collector as if no observations had been collected.java.lang.StringtoString()-
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:CollectorIfcCollect on the supplied value- Parameters:
x- a double representing the observation
-
reset
public void reset()
Description copied from interface:CollectorIfcResets 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:
toStringin classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-
-