code: def test_sm1_mice_reg():
      # Square error of the model predictions should be less than
      # if we just predicted the mean every time.
      imputed_errors = {}
      modeled_errors = {}
      random_sample_error = {}
      for col in [0, 1, 2, 3]:
          ind = kernel_sm1.na_where[col]
          nonmissind = np.delete(range(iris.shape[0]), ind)
          orig = iris.iloc[ind, col]
          preds = kernel_sm1.get_raw_prediction(col)
          imps = kernel_sm1[0, col, iterations]
          random_sample_error[col] = mse(
              orig, np.mean(iris.iloc[nonmissind, col])
          )
          modeled_errors[col] = mse(orig, preds[ind])
          imputed_errors[col] = mse(orig, imps)
          assert random_sample_error[col] > modeled_errors[col]
          assert random_sample_error[col] > imputed_errors[col]
  
file_path: miceforest/tests/test_imputed_accuracy.py
imports: from sklearn.datasets import load_iris
  import pandas
  import numpy
  import miceforest
  from miceforest.utils import logistic_function
  from sklearn.metrics import roc_auc_score
  from miceforest import mean_match_fast_cat, mean_match_default, mean_match_shap
label_desc: Use image node_id 5 for calling a global function with example usage: test_sm1_mice_reg() without return types