Package jsl.utilities.statistic
Interface WeightedStatisticIfc
-
- All Superinterfaces:
GetCSVStatisticIfc,GetNameIfc,IdentityIfc
- All Known Implementing Classes:
WeightedStatistic
public interface WeightedStatisticIfc extends IdentityIfc, GetCSVStatisticIfc
If the observation or the weight is * infinite or NaN, then the observation should not be recorded and the number of missing observations * is incremented. If the observed weight is negative or 0.0, then the observation should not be recorded and * the number of missing observations is incremented.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description doublegetAverage()Gets the weighted average of the collected observations.doublegetCount()Gets the count of the number of the observations.doublegetLastValue()Gets the last observed data pointdoublegetLastWeight()Gets the last observed weightdoublegetMax()Gets the maximum of the observations.doublegetMin()Gets the minimum of the observations.doublegetNumberMissing()When a data point having the value of (Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY) are presented it is excluded from the summary statistics and the number of missing points is noted.doublegetSumOfWeights()Gets the sum of the observed weights.default doublegetUnWeightedAverage()doublegetUnWeightedSum()doublegetWeightedSum()Gets the weighted sum of observations observed.doublegetWeightedSumOfSquares()Gets the weighted sum of squares for observations observed.voidreset()Clears all the statistical accumulators-
Methods inherited from interface jsl.utilities.statistic.GetCSVStatisticIfc
getCSVStatistic, getCSVStatisticHeader
-
Methods inherited from interface jsl.utilities.GetNameIfc
getName
-
Methods inherited from interface jsl.utilities.IdentityIfc
getId
-
-
-
-
Method Detail
-
getCount
double getCount()
Gets the count of the number of the observations.- Returns:
- A double representing the count
-
getMax
double getMax()
Gets the maximum of the observations.- Returns:
- A double representing the maximum
-
getMin
double getMin()
Gets the minimum of the observations.- Returns:
- A double representing the minimum
-
getSumOfWeights
double getSumOfWeights()
Gets the sum of the observed weights.- Returns:
- A double representing the sum of the weights
-
getAverage
double getAverage()
Gets the weighted average of the collected observations.- Returns:
- A double representing the weighted average or Double.NaN if no observations.
-
getWeightedSum
double getWeightedSum()
Gets the weighted sum of observations observed.- Returns:
- A double representing the weighted sum
-
getWeightedSumOfSquares
double getWeightedSumOfSquares()
Gets the weighted sum of squares for observations observed.- Returns:
- A double representing the weighted sum of squares
-
reset
void reset()
Clears all the statistical accumulators
-
getLastValue
double getLastValue()
Gets the last observed data point- Returns:
- A double representing the last observed observation
-
getLastWeight
double getLastWeight()
Gets the last observed weight- Returns:
- A double representing the last observed weight
-
getNumberMissing
double getNumberMissing()
When a data point having the value of (Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY) are presented it is excluded from the summary statistics and the number of missing points is noted. If the weight is infinite or less than or equal to zero, then the data point should not be recorded. This method reports the number of missing points that occurred during the collection.- Returns:
- the number missing
-
getUnWeightedSum
double getUnWeightedSum()
- Returns:
- the unweighted sum of all of the observed data
-
getUnWeightedAverage
default double getUnWeightedAverage()
- Returns:
- the unweighted average of all the observed data
-
-