parameters: (self,
                 feature_columns=None,
                 model_dir=None,
                 weight_column_name=None,
                 head=None,
                 optimizer=None,
                 kernel_mappers=None,
                 config=None)
docstring: Constructs a `_KernelEstimator` object.
docstring_summary: Constructs a `_KernelEstimator` object.
docstring_tokens: Constructs a _KernelEstimator object .
function: def __init__(self,
                 feature_columns=None,
                 model_dir=None,
                 weight_column_name=None,
                 head=None,
                 optimizer=None,
                 kernel_mappers=None,
                 config=None):
      """Constructs a `_KernelEstimator` object."""
      if not feature_columns and not kernel_mappers:
        raise ValueError(
            "You should set at least one of feature_columns, kernel_mappers.")
      if not _check_valid_kernel_mappers(kernel_mappers):
        raise ValueError("Invalid kernel mappers.")
  
      if not _check_valid_head(head):
        raise ValueError(
            "head type: {} is not supported. Supported head types: "
            "_BinaryLogisticHead, _MultiClassHead.".format(type(head)))
  
      params = {
          "head": head,
          _FEATURE_COLUMNS: feature_columns or [],
          _OPTIMIZER: optimizer,
          _KERNEL_MAPPERS: kernel_mappers,
      }
      super(_KernelEstimator, self).__init__(
          model_fn=_kernel_model_fn,
          model_dir=model_dir,
          config=config,
          params=params)
function_tokens: def __init__ ( self , feature_columns = None , model_dir = None , weight_column_name = None , head = None , optimizer = None , kernel_mappers = None , config = None ) : if not feature_columns and not kernel_mappers : raise ValueError ( "You should set at least one of feature_columns, kernel_mappers." ) if not _check_valid_kernel_mappers ( kernel_mappers ) : raise ValueError ( "Invalid kernel mappers." ) if not _check_valid_head ( head ) : raise ValueError ( "head type: {} is not supported. Supported head types: " "_BinaryLogisticHead, _MultiClassHead." . format ( type ( head ) ) ) params = { "head" : head , _FEATURE_COLUMNS : feature_columns or [ ] , _OPTIMIZER : optimizer , _KERNEL_MAPPERS : kernel_mappers , } super ( _KernelEstimator , self ) . __init__ ( model_fn = _kernel_model_fn , model_dir = model_dir , config = config , params = params )