code: def root_mean_square(X):
      ''' root mean square for each variable in the segmented time series '''
      segment_width = X.shape[1]
      return np.sqrt(np.sum(X * X, axis=1) / segment_widthf root_mean_square(X):
      ''' root mean square for each variable in the segmented time series '''
      segment_width = X.shape[1]
      return np.sqrt(np.sum(X * X, axis=1) / segment_width)
docs: root mean square for each variable in the segmented time series