class BatchVector extends AnyRef
The BatchVector
class contains a VectorD
for maintaining experimental
data in multiple batches and methods for computing statistics on these data.
Ex: It can be used to support the Method of Batch Means (MBM).
- Alphabetic
- By Inheritance
- BatchVector
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
BatchVector(name: String, _bSize: Int = 10, _nBatches: Int = 10)
- name
name of the batch statistic
- _bSize
size of each batch
- _nBatches
number of batches
Value Members
-
def
acorr: Double
Compute the lag 1 auto-correlation of the batch means.
Compute the lag 1 auto-correlation of the batch means. Be sure to run 'computeMeans' first.
-
def
allocBatches(more: Int = 1): Unit
Allocate additional batches for this batched vector.
Allocate additional batches for this batched vector.
- more
the number of additional batches to allocate
-
def
bSize: Int
Get the batch size.
-
def
computeMeans(): Unit
Compute means for each batch and store them in the 'yb' statistics vector.
-
def
len: Int
Get the total length of the batched vector.
-
def
nBatches: Int
Get the number of batches.
-
def
precise(threshold: Double = .2, p: Double = .95): Boolean
Determine whether the Confidence Interval (CI) on the mean is tight enough.
-
def
precision(p: Double = .95): Double
Compute the relative precision, i.e., the ratio of the confidence interval half-width and the mean.
Compute the relative precision, i.e., the ratio of the confidence interval half-width and the mean.
- p
the confidence level
-
def
tally(value: Double): Unit
Add the given value in the next index position in the batched vector.
Add the given value in the next index position in the batched vector.
- value
the given value to add
-
def
toString(): String
Convert the batched vector into a string showing each of the batches.
Convert the batched vector into a string showing each of the batches.
- Definition Classes
- BatchVector → AnyRef → Any
-
def
uncorrelated(threshold: Double = .2): Boolean
Determine whether the batches are sufficiently uncorrelated.
Determine whether the batches are sufficiently uncorrelated.
- threshold
the cut-off value to be considered uncorrelated