def reserrorcalc(test_set, model):
  """
  Calculates RSS error for the given test set
  """
  # Extracting X
  X = test_set[:,:-1]

  # Extracting labels
  Y = test_set[:,-1]
  residual_err = sum((model.predict(X) - Y) ** 2)
  return residual_err