class_docstr: Fits a cartesian product GP by tuning the hyper-parameters. 
class_docstr_tok: ["Fits","a","cartesian","product","GP","by","tuning","the","hyper-parameters","."]
docstr: Constructor. 
docstr_tok: ["Constructor","."]
code: def __init__(
      self,
      X,
      Y,
      domain,
      domain_kernel_ordering=None,
      domain_lists_of_dists=None,
      domain_dist_computers=None,
      options=None,
      reporter=None,
  ):
      """Constructor."""
      # pylint: disable=no-member
      # Set domain
      if isinstance(domain, str):
          domain, config_orderings = load_cp_domain_from_config_file(
              domain
          )
          if domain_kernel_ordering is None:
              domain_kernel_ordering = config_orderings.kernel_ordering
      # Check before assignment
      if not isinstance(domain, domains.Domain):
          raise ValueError(
              "domain should be instance of domain.Domain or a file name"
              + " to a configuration json/protobuf file describing the domain."
          )
      if domain_kernel_ordering is None:
          raise ValueError(
              "If domain is not a config file name, domain_kernel_ordering"
              + " cannot be None."
          )
      self.domain_num_domains = domain.num_domains
      self.domain = domain
      self.domain_kernel_ordering = domain_kernel_ordering
      # Now create a struct to store kernel dependent parameters
      if domain_lists_of_dists is None:
          domain_lists_of_dists = [None] * self.domain_num_domains
      if domain_dist_computers is None:
          domain_dist_computers = [None] * self.domain_num_domains
      self.domain_lists_of_dists = domain_lists_of_dists
      self.domain_dist_computers = domain_dist_computers
      self.domain_kernel_params_for_each_domain = [
          Namespace() for _ in range(self.domain_num_domains)
      ]
      for idx in range(self.domain_num_domains):
          self.domain_kernel_params_for_each_domain[
              idx
          ].list_of_dists = domain_lists_of_dists[idx]
          self.domain_kernel_params_for_each_domain[
              idx
          ].dist_computer = domain_dist_computers[idx]
      # Create reporter and options
      reporter = get_reporter(reporter)
      options = load_options(
          cartesian_product_gp_args, partial_options=options
      )
      # Call super constructor
      super(CPGPFitter, self).__init__(X, Y, options, reporter)
  
imports: from __future__ import print_function
  from argparse import Namespace
  import numpy
  from ..exd import domains
  from ..exd.cp_domain_utils import load_cp_domain_from_config_file
  from .None import gp_core, mf_gp
  from .euclidean_gp import get_euclidean_integral_gp_kernel_with_scale, prep_euclidean_integral_kernel_hyperparams
  from .kernel import CartesianProductKernel, HammingKernel
  from ..utils.general_utils import get_idxs_from_list_of_lists
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 1 to create a new CPGPFitter object from inherited base classes: gp_core with example: obj = CPGPFitter(X, Y, domain, domain_kernel_ordering, domain_lists_of_dists, domain_dist_computers, options, reporter)