Description Usage Arguments Details Author(s) See Also Examples
Switch input key-value pairs which is division by-location to the key-value pairs which is division by-month.
1 2 | swaptoTime(input, output, cluster_control = mapreduce.control(),
model_control = spacetime.control())
|
input |
The path of input file on HDFS. It should be by-location division. |
output |
The path of output file on HDFS. It is by-month division. |
cluster_control |
Should be a list object generated from |
model_control |
Should be a list object generated from |
swaptoTime
is used for switching division by-location to division by-month.
The input key is location index, and input value is a vectorized matrix with
Mlcontrol$n
rows and 3 columns in order of smoothed, seasonal, trend. For each row
of matrix, a new key-value pair is generated. Since the matrix is vectorized
by column, the trend in ith row is i+Mlcontrol$n
. Index j
controls the index
of multiple location in one time point.
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 | ## Not run:
FileInput <- "/tmp/bystatfit"
FileOutput <- "/tmp/bymthse"
ccontrol <- mapreduce.control(
libLoc=NULL, reduceTask=5, io_sort=128, slow_starts = 0.5,
reduce_input_buffer_percent=0.2, reduce_parallelcopies=10,
reduce_merge_inmem=0, task_io_sort_factor=100,
spill_percent=0.9, reduce_shuffle_input_buffer_percent = 0.7,
reduce_shuffle_merge_percent = 0.5
)
mcontrol <- spacetime.control(
vari = "resp", time = "date", n = 576, stat_n=7738, n.p = 12,
s.window = "periodic", t.window = 241,
degree = 2, span = 0.015, Edeg = 2
)
swaptoTime(FileInput, FileOutput, cluster_control=ccontrol, model_control=mcontrol)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.