code: def NRMSE_sliding(data, pred, windowSize):
    
  
    halfWindowSize = int(round(float(windowSize)/2))
    window_center = range(halfWindowSize, len(data)-halfWindowSize, int(round(float(halfWindowSize)/5.0)))
    nrmse = []
    for wc in window_center:
      nrmse.append(NRMSE(data[wc-halfWindowSize:wc+halfWindowSize],
                         pred[wc-halfWindowSize:wc+halfWindowSize]))
  
    return (window_center, nrmse)
docs: Computing NRMSE in a sliding window
    :param data:
    :param pred:
    :param windowSize:
    :return: (window_center, NRMSE)