Description Usage Arguments Author(s) See Also Examples
The prediction at new locations are calculated based on the fitting results saved on HDFS based on the original dataset.
1 2 | predNew_mr(newdata, input, output, info, mlcontrol = spacetime.control(),
clcontrol = mapreduce.control())
|
newdata |
A data.frame includes all locations' longitude, latitude, and elevation, where the prediction is to be calculated. |
input |
The path of input file on HDFS. It should be by-month division with all fitting results of original dataset |
output |
The path of output on HDFS where all the intermediate outputs will be saved. |
info |
The RData path on HDFS which contains all station metadata of original dataset |
mlcontrol |
Should be a list object generated from |
clcontrol |
Should be a list object generated from |
Xiaosu Tong
spacetime.control
, mapreduce.control
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## Not run:
clcontrol <- mapreduce.control(libLoc=NULL, reduceTask=95, io_sort=100, slow_starts = 0.5)
mlcontrol <- spacetime.control(
vari="resp", time="date", n=576, n.p=12, stat_n=7738,
s.window="periodic", t.window = 241, degree=2, span=0.015, Edeg=2
)
new.grid <- expand.grid(
lon = seq(-126, -67, by = 0.1),
lat = seq(25, 49, by = 0.1)
)
instate <- !is.na(map.where("state", new.grid$lon, new.grid$lat))
new.grid <- new.grid[instate, ]
elev.fit <- spaloess( elev ~ lon + lat,
data = station_info,
degree = 2,
span = 0.015,
distance = "Latlong",
normalize = FALSE,
napred = FALSE,
alltree = FALSE,
family="symmetric",
control=loess.control(surface = "direct")
)
grid.fit <- predloess(
object = elev.fit,
newdata = data.frame(
lon = new.grid$lon,
lat = new.grid$lat
)
)
new.grid$elev2 <- log2(grid.fit + 128)
predNew_mr(
newdata=new.grid, input="/tmp/output_bymth", output = "/tmp",
info="/tmp/station_info.RData", mlcontrol=mlcontrol, clcontrol=clcontrol
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.