def denormalize(data, norm_params, method='zscore'):
    """
    Reverse normalization time series
    :param data: normalized time series
    :param norm_params: tuple with params mean, std, max, min
    :param method: zscore or minmax
    :return: time series in original scale
    """
    assert method in ['zscore', 'minmax', None]

    if method == 'zscore':
        return (data * norm_params['std']) + norm_params['mean']

    elif method == 'minmax':
        return (data * (norm_params['max']) - (norm_params['min']) + norm_params['max'])

    elif method is None:
        return data