Shift {SBCK} | R Documentation |
Shift
Description
Class to shift a dataset.
Format
R6Class
object.
Details
Transform autocorrelations to intervariables correlations
Value
Object of R6Class
Methods
new(lag,method,ref,)
This method is used to create object of this class with
Shift
transform(X)
Method to shift a dataset
inverse(Xs)
Method to inverse the shift of a dataset
Public fields
lag
[integer] max lag for autocorrelations
Active bindings
method
[character] If inverse is by row or column.
ref
[integer] reference column/row to inverse shift.
Methods
Public methods
Method new()
Create a new Shift object.
Usage
Shift$new(lag, method = "row", ref = 1)
Arguments
lag
[integer] max lag for autocorrelations
method
[character] If "row" inverse by row, else by column
ref
[integer] starting point for inverse transform
Returns
A new 'Shift' object.
Method transform()
Shift the data
Usage
Shift$transform(X)
Arguments
X
[matrix: n_samples * n_features] Data to shift
Returns
[matrix] Matrix shifted
Method inverse()
Inverse the shift of the data
Usage
Shift$inverse(Xs)
Arguments
Xs
[matrix] Data Shifted
Returns
[matrix] Matrix un shifted
Method clone()
The objects of this class are cloneable with this method.
Usage
Shift$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
X = base::t(matrix( 1:20 , nrow = 2 , ncol = 10 ))
sh = Shift$new(1)
Xs = sh$transform(X)
Xi = sh$inverse(Xs)