old_contents: """impyute.utils.compare.py"""
  
  
  class Tester:
      """Automates testing of datasets, machine learning models and imputation
      algorithms"""
      def __init__(self):
          """ Initializes the Tester object
  
          """
          pass
  
      def add(self, key, value):
          pass
  
      def _load_datasets(self, name):
          pass
  
      def run(self):
          pass
  
new_contents: """impyute.utils.compare.py"""
  from sklearn.svm import SVC
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.naive_bayes import GaussianNB
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import accuracy_score
  
  
  def compare(imputed, log_path="results.txt"):
      """
      PARAMETERS
      ----------
      imputed: [(str, np.ndarray), (str, np.ndarray)...]
         List of tuples containing (imputation algorithm name, imputed data)
      RETURNS
      ------
      .txt file of classification results on imputed data
      """
      clfs = [["SVC", SVC()],
              ["KNeighbours", KNeighborsClassifier(2)],
              ["GaussianNB", GaussianNB()],
              ["RandomForestClassifier", RandomForestClassifier()]]
  
      results = {imputation_name: [] for imputation_name, _ in imputed}
  
      for imputation_name, data in imputed:
          X, y = data
          X_train, X_test, y_train, y_test = train_test_split(X, y,
                                                              test_size=0.33,
                                                              random_state=42)
          print(imputation_name)
          for clf_name, clf in clfs:
              clf.fit(X_train, y_train)
              y_pred = clf.predict(X_test)
              accuracy = accuracy_score(y_test, y_pred)
              results[imputation_name].append((clf_name, accuracy))
              print("...{}".format(clf_name))
  
      with open(log_path, 'w') as f:
          f.write(str(results))
      print("Results saved to {}".format(log_path))
  
subject: add function to compare different imputation algorithms