Description Fields Methods See Also Examples
This class is a forecast where the data is many simulated trials.
The data used to create the forecast.
When the forecast was created.
The times the forecast is about.
The model used to create the forecast.
The number of simulations.
Draw a random sample from the possible model predictions. Please see implementation of the data for the properties of the sampling.
Get the distribution of simulations of the data within fixed bins.
cutoffs | - | A numeric vector with elements to use as the dividing values for the bins. -Inf, and Inf will be added automatically. |
include.lowest | - | logical, indicating if an x[i] equal to the lowest (or highest, for right = FALSE) breaks value should be included. |
right | - | logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa. |
an ArrayData.
A function for debugging the methods of this class. It calls the browser command. In order for methods to opt into to debugging, they need to implement the following code at the beginning: if(<method_name> %in% private$.debug){browser()}. This method exists, because the debugger is not always intuitive when it comes to debugging R6 methods.
string | - | The name(s) of methods to debug as a character vector |
This function should be extended. Create a new instance of this class.
... | - | This function should take in any arguments just in case. |
This method extracts the elementwise mean of the forecast. This function will not change the number of rows or columns in the data, but will convert probabilistic estimates into deterministic ones.
This method extracts the elementwise median of the forecast. This function will not change the number of rows or columns in the data, but will convert probabilistic estimates into deterministic ones.
a MatrixData.
Get the cutoffs for each percentile in alphas.
alphas | - | A numeric vector with elements between 0 and 1 of percentiles to find cutoffs for. |
na.rm | - | A boolean regarding whether to remove NA values before computing the quantiles. |
an ArrayData.
A function for ceasing to debug methods. Normally a method will call the browser command every time it is run. This command will stop it from doing so.
string | - | The name(s) of the methods to stop debugging. |
Inherits from : Forecast
Is inherited by : IncidenceForecast
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | IncidenceForecast <- R6Class(
classname = "IncidenceForecast",
inherit = SimulatedForecast,
private = list(
.data = AbstractSimulatedIncidenceMatrix$new()
),
public = list(
initialize = function(data=SimulatedIncidenceMatrix$new(),forecastTimes=c()){
if(data$ncol != length(forecastTimes)){
stop("The number of columns should be the number of times forecasted.")
}
private$.forecastMadeTime = now()
private$.forecastTimes = forecastTimes
private$.data = data
}
),
active = list(
data = function(value){
private$defaultActive(".data","private",value)
}
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.