class_docstr: Lag operator.
  
  Shift an input array :math:`X` with :math:`s` steps, i.e. for some time
  series :math:`\mathbf{X} = (X_t, X_{t-1}, ..., X_{0})`,
  
  .. math::
  
      L^{s} \mathbf{X} = (X_{t-s}, X_{t-1-s}, ..., X_{s - s})
  
  Parameters
  ----------
  
  s : int
      number of lags to generate
  
  
  Examples
  --------
  >>> import numpy as np
  >>> from mlens.preprocessing import Shift
  >>> X = np.arange(10)
  >>> L = Shift(2)
  >>> Z = L.fit_transform(X)
  >>> print("X : {}".format(X[2:]))
  >>> print("Z : {}".format(Z))
  X : [2 3 4 5 6 7 8 9]
  Z : [0 1 2 3 4 5 6 7]
class_docstr_tok: ["Lag","operator",".","Shift","an","input","array",":","math",":","`","X","`","with",":","math",":","`","s","`","steps",",","i.e",".","for","some","time","series",":","math",":","`","\\mathbf","{","X","}","=","(","X_t",",","X_","{","t-1","}",",","...",",","X_","{","0","}",")","`",",","..","math",":",":","L^","{","s","}","\\mathbf","{","X","}","=","(","X_","{","t-s","}",",","X_","{","t-1-s","}",",","...",",","X_","{","s","-","s","}",")","Parameters","--","--","--","--","--","s",":","int","number","of","lags","to","generate","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","mlens.preprocessing","import","Shift",">",">",">","X","=","np.arange","(","10",")",">",">",">","L","=","Shift","(","2",")",">",">",">","Z","=","L.fit_transform","(","X",")",">",">",">","print","(","``","X",":","{","}","''",".format","(","X","[","2",":","]",")",")",">",">",">","print","(","``","Z",":","{","}","''",".format","(","Z",")",")","X",":","[","2","3","4","5","6","7","8","9","]","Z",":","[","0","1","2","3","4","5","6","7","]"]
code: def __init__(self, s):
      self.s = s
  
file_path: mlens/mlens/preprocessing/preprocess.py
imports: from __future__ import division, print_function
  from ..externals.sklearn.base import BaseEstimator, TransformerMixin
label_desc: Use image node_id 1 to create a new Shift object from inherited base classes: BaseEstimator, TransformerMixin with example: obj = Shift(s)