swaptoLoc: Swap to division by-location

Description Usage Arguments Author(s) See Also Examples

Description

Switch input key-value pairs which is division by-month to the key-value pairs which is division by-location.

Usage

1
2
3
swaptoLoc(input, output, final = FALSE,
  cluster_control = mapreduce.control(),
  model_control = spacetime.control())

Arguments

input

The path of input file on HDFS. It should be by-month division.

output

The path of output file on HDFS. It is by-location division.

final

There two steps of switching to by-location division in the routine. In the first one, which final is set to be FALSE, the intermediate value is vectorized to minimize the size. In the second one, which final is set to be TRUE, the output value is saved as data.frame.

cluster_control

Should be a list object generated from mapreduce.control function. The list including all necessary Rhipe parameters and also user tunable MapReduce parameters.

model_control

Should be a list object generated from spacetime.control function. The list including all necessary smoothing parameters of nonparametric fitting.

Author(s)

Xiaosu Tong

See Also

spacetime.control, mapreduce.control

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
    FileInput <- "/tmp/bymthfit"
    FileOutput <- "/tmp/bystat"
    ccontrol <- mapreduce.control(
      libLoc=NULL, reduceTask=5, io_sort=128, slow_starts = 0.5,
      reduce_input_buffer_percent=0.4, reduce_parallelcopies=10,
      reduce_merge_inmem=0, task_io_sort_factor=100,
      spill_percent=0.9, reduce_shuffle_input_buffer_percent = 0.8,
      reduce_shuffle_merge_percent = 0.4
    )
    mcontrol <- spacetime.control(
      vari="resp", time="date", n=576, n.p=12, stat_n=7738,
      s.window=13, t.window = 241, degree=2, span=0.015, Edeg=2
    )
    swaptoLoc(FileInput, FileOutput, cluster_control=ccontrol, model_control=mcontrol)

## End(Not run)

XiaosuTong/drsstl documentation built on May 9, 2019, 11:06 p.m.