Description Usage Arguments Details Author(s) Examples
View source: R/generate_test_data.R
Function that utilizes the original dataset, the centers of the model to be analysed and weather information to create a test dataset that will be scaled and read to use in posteriror evaluations.
1 2 |
input_data |
Dataset in sprad format containing LSUs as columns and cell numbers as rows |
center_mean |
Center attributes from scaled training data of the model used in the parameter model. Will be used if scale is set to TRUE. Example: train_data <- scale(train_data) col_means_train_harvest <- attr(train_data, "scaled:center") |
center_stddev |
Scale attributes from scaled training data of the model. Will be used if scale is set to TRUE. |
grid |
dataset with grid cells information. Has to be the same size as the |
weather_dataset |
Data set containing weather information. |
wt_f |
koppen geiger climate classification dataset created by the file: koppen_geiger_pre_processing.R |
scaled |
Boolean that to define wheater the data will be scalled or not. |
soil_type |
Dataset with information on soil type on cell level. |
points |
A list of values that will substitute the orinal columns with the number of LSUs in case a more fine LSU resolution is desired for finding the optminal LSU. Ex: points = as.list(seq(0,25,0.5)) |
If wt_t.Rdata is null all cells will be scalled and outputed, if wt_f is filled with the koppen geiger climate classification generated by the file: koppen_geiger_pre_processing.R. the EF an d ET climate zones will be removed from the analysis.
Marcos Alves mppalves@gmail.com
1 2 3 4 5 6 7 8 | ##Scalled test data
generate_test_data(map_harvest_real, col_means_train_harvest, col_stddevs_train_harvest, grid, weather_dataset, soil_type = soil)
##Unscaled test data
generate_test_data(map_harvest_real, col_means_train_harvest, col_stddevs_train_harvest, grid, weather_dataset, scaled = F, soil_type = soil)
##Unscaled test data with LSU points substitutes
generate_test_data(map_harvest_real, col_means_train_harvest, col_stddevs_train_harvest, grid, weather_dataset, scaled = F, soil_type = soil, points = as.list(seq(0,25,0.5)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.