Description Usage Arguments Value See Also Examples
View source: R/fit_subintervalls.R
Fit the spatio-temporal models on subinterval.
1 2 3 4 | fit_subintervalls(data, grid = NULL, training_set = NULL, unit = "1 week",
nItr = 5000, nBurn = 1000, return = "prediction", tol = 0.01,
retry_count = 5, retry_reason_mean = 500, retry_reason_rmse = 2000,
mc.cores = parallel::detectCores() - 1, ...)
|
data |
Modelling data.frame which contains information about the covariables and the target variable |
grid |
grid data where a prediction should be calculated or a training_set |
training_set |
an object generated by get_test_and_training_set, if those an object is delivered, the data argument will be reduced to the in training_set specified training sensors. |
unit |
for splitting the dataset, see lubridate::floor_date for more informations |
nItr |
Number of MCMC iterations. Default value is 5000. |
nBurn |
Number of burn-in samples. This number of samples will be discarded before making any inference. Default value is 1000. |
return |
default is 'prediction', otherwise the parametervalues of each submodel is returned |
tol |
Minimum separation distance between any two locations out of those specified by coords, knots.coords and pred.coords. The default is 0.005. The programm will exit if the minimum distance is less than the non-zero specified value. This will ensure non-singularity of the covariance matrices. |
retry_count |
How much retries should be tried, if some strange behavior appears, for example posteriori Mean above 500 or a RMSE of the prediction above 2000. Both could be specified separately. Default is 5. |
retry_reason_mean |
retry on posteriori Mean above that value, default is 500 |
retry_reason_rmse |
retry on a RMSE above that value, default is 2000 |
mc.cores |
how much cores should be used for parallelization, default is one core less your maximum number of detected cores. |
... |
Parameters passed to fit_sp_model |
the grid with added columns of the prediction calculations, or the crossvaldiation predictions
fit_subintervalls, predict.stAirPol.model, predict_split fit_model
1 2 3 4 5 6 7 8 9 10 11 12 | data("mini_dataset")
mini_dataset <- clean_model_data(mini_dataset)
formula = value ~ humi + temp + rainhist + windhist +
trafficvol + log(sensor_age)
training_set <- get_test_and_training_set(mini_dataset, sampel_size = 0.75,
random.seed = 220292)
prediction.gp <- fit_subintervalls(data = mini_dataset, formula = formula,
model = 'GP', training_set = training_set,
unit = '1 day')
retry model fitting and prediction in cause of a strange behavior
sometimes
remove sensors which are always NA
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.