neuroprob/utils/signal.py
def lagged_input(input, hist_len, hist_stride=1, time_stride=1, tensor_type=torch.float):
    """
    Introduce lagged history input from time series.
    
    :param torch.tensor input: input of shape (dimensions, timesteps)
    :param int hist_len: 
    :param int hist_stride: 
    :param int time_stride: 
    :param dtype tensor_type:
    :returns: lagged input tensor of shape (dimensions, time-H+1, history)
    :rtype: torch.tensor
    """
    in_unfold = input.unfold(-1, hist_len, time_stride)[:, :, ::hist_stride] # (dim, time, hist)
    return in_unfold

    Introduce lagged history input from time series.
    
    :param torch.tensor input: input of shape (dimensions, timesteps)
    :param int hist_len: 
    :param int hist_stride: 
    :param int time_stride: 
    :param dtype tensor_type:
    :returns: lagged input tensor of shape (dimensions, time-H+1, history)
    :rtype: torch.tensor
    
Introduce lagged history input from time series.
Introduce lagged history input from time series .
def lagged_input(input, hist_len, hist_stride=1, time_stride=1, tensor_type=torch.float):
    in_unfold = input.unfold(-1, hist_len, time_stride)[:, :, ::hist_stride] 
    return in_unfold
def lagged_input ( input , hist_len , hist_stride = 1 , time_stride = 1 , tensor_type = torch . float ) : in_unfold = input . unfold ( - 1 , hist_len , time_stride ) [ : , : , : : hist_stride ] return in_unfold
Introduce lagged history input from time series.
Introduce lagged history input from time series .
"""
    Introduce lagged history input from time series.
    
    :param torch.tensor input: input of shape (dimensions, timesteps)
    :param int hist_len: 
    :param int hist_stride: 
    :param int time_stride: 
    :param dtype tensor_type:
    :returns: lagged input tensor of shape (dimensions, time-H+1, history)
    :rtype: torch.tensor
    """ # (dim, time, hist)
lagged input tensor of shape (dimensions, time-H+1, history)
lagged input tensor of shape ( dimensions time - H + 1 history )
torch.tensor
input
input of shape (dimensions, timesteps)
input of shape ( dimensions timesteps )
hist_len
None
hist_stride
None
time_stride
None
tensor_type
None