class_docstr: This class contains everything needed to run an end-to-end ATM classifier
  pipeline. It is initialized with a set of parameters and trained like a
  normal sklearn model. This class can be pickled and saved to disk, then
  unpickled outside of ATM and used to classify new datasets.
class_docstr_tok: ["This","class","contains","everything","needed","to","run","an","end-to-end","ATM","classifier","pipeline",".","It","is","initialized","with","a","set","of","parameters","and","trained","like","a","normal","sklearn","model",".","This","class","can","be","pickled","and","saved","to","disk",",","then","unpickled","outside","of","ATM","and","used","to","classify","new","datasets","."]
code: def _special_conversions(self, params):
      # TODO: replace this logic with something better
      # create list parameters
      lists = defaultdict(list)
      element_regex = re.compile(r"(.*)\[(\d)\]")
      for name, param in list(params.items()):
          # look for variables of the form "param_name[1]"
          match = element_regex.match(name)
          if match:
              # name of the list parameter
              lname = match.groups()[0]
              # index of the list item
              index = int(match.groups()[1])
              lists[lname].append((index, param))
  
              # drop the element parameter from our list
              del params[name]
  
      for lname, items in list(lists.items()):
          # drop the list size parameter
          del params["len(%s)" % lname]
  
          # sort the list by index
          params[lname] = [val for idx, val in sorted(items)]
  
      # Gaussian process classifier
      if self.method == "gp":
          if params["kernel"] == "constant":
              params["kernel"] = ConstantKernel()
          elif params["kernel"] == "rbf":
              params["kernel"] = RBF()
          elif params["kernel"] == "matern":
              params["kernel"] = Matern(nu=params["nu"])
              del params["nu"]
          elif params["kernel"] == "rational_quadratic":
              params["kernel"] = RationalQuadratic(
                  length_scale=params["length_scale"],
                  alpha=params["alpha"],
              )
              del params["length_scale"]
              del params["alpha"]
          elif params["kernel"] == "exp_sine_squared":
              params["kernel"] = ExpSineSquared(
                  length_scale=params["length_scale"],
                  periodicity=params["periodicity"],
              )
              del params["length_scale"]
              del params["periodicity"]
  
      # return the updated parameter vector
      return params
  
imports: from __future__ import absolute_import, division, unicode_literals
  import logging
  import os
  import pickle
  import re
  import time
  from builtins import object
  from collections import defaultdict
  from importlib import import_module
  import numpy
  import pandas
  from sklearn import decomposition
  from sklearn.gaussian_process.kernels import RBF, ConstantKernel, ExpSineSquared, Matern, RationalQuadratic
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler, StandardScaler
  from atm.constants import Metrics
  from atm.encoder import DataEncoder
  from atm.method import Method
  from atm.metrics import cross_validate_pipeline, test_pipeline
label_desc: Use image node_id 7 for calling the Model obj's underlying member method code with example usage: obj._special_conversions(params) and returns: params