class Statistic extends Error
The Statistic
class is used to collect values and compute sample statistics
on them (e.g., waiting time). Contrast with TimeStatistic
defined below.
- Alphabetic
- By Inheritance
- Statistic
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Statistic(name: String = "stat", unbiased: Boolean = false)
- name
the name for this statistic (e.g., 'waitingTime')
- unbiased
whether the estimators are restricted to be unbiased
Value Members
-
final
def
flaw(method: String, message: String): Unit
- Definition Classes
- Error
-
def
interval(p: Double = .95): Double
Compute the confidence interval half-width for the given confidence level.
Compute the confidence interval half-width for the given confidence level.
- p
the confidence level
-
def
ma: Double
Compute/estimate the mean absolue value (ma), e.g., Mean Absolute Error (MAE).
-
def
max: Double
Return the maximum value in sample.
-
def
mean: Double
Compute/estimate the sample mean.
-
def
min: Double
Return the minimum value in sample.
-
def
ms: Double
Compute/estimate the mean square (ms), e.g., Mean Square Error (MSE).
- val name: String
-
def
nd: Double
Return the number of samples as a double.
-
def
num: Int
Return the number of samples.
- def reset(): Unit
-
def
rms: Double
Compute/estimate the root mean square (rms), e.g., Root Mean Square Error (RMSE).
-
def
show: String
Show the values of this collector's accumulators.
-
def
statRow: Array[Any]
Return the summary statistics as a row/Array.
-
def
stddev: Double
Compute/estimate the sample standard deviation.
-
def
tally(x: Double): Unit
Tally the next value and update accumulators.
Tally the next value and update accumulators.
- x
the value to tally
-
def
toString(): String
Generate a row of statistical results as a string.
Generate a row of statistical results as a string.
- Definition Classes
- Statistic → AnyRef → Any
-
def
variance: Double
Compute/estimate the sample variance.
Compute/estimate the sample variance. The denominator is one less for unbiased (n-1) vs. maximum likelihood (n) estimators. Also use n for population variance.