parameters: (self,
                 model_dir=None,
                 linear_feature_columns=None,
                 linear_optimizer='Ftrl',
                 dnn_feature_columns=None,
                 dnn_optimizer='Adagrad',
                 dnn_hidden_units=None,
                 dnn_activation_fn=nn.relu,
                 dnn_dropout=None,
                 n_classes=2,
                 weight_column=None,
                 label_vocabulary=None,
                 input_layer_partitioner=None,
                 config=None)
docstring: Initializes a DNNLinearCombinedClassifier instance.
  
      Args:
        model_dir: Directory to save model parameters, graph and etc. This can
          also be used to load checkpoints from the directory into a estimator
          to continue training a previously saved model.
        linear_feature_columns: An iterable containing all the feature columns
          used by linear part of the model. All items in the set must be
          instances of classes derived from `FeatureColumn`.
        linear_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the linear part of the model. Defaults to FTRL optimizer.
        dnn_feature_columns: An iterable containing all the feature columns used
          by deep part of the model. All items in the set must be instances of
          classes derived from `FeatureColumn`.
        dnn_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the deep part of the model. Defaults to Adagrad optimizer.
        dnn_hidden_units: List of hidden units per layer. All layers are fully
          connected.
        dnn_activation_fn: Activation function applied to each layer. If None,
          will use `tf.nn.relu`.
        dnn_dropout: When not None, the probability we will drop out
          a given coordinate.
        n_classes: Number of label classes. Defaults to 2, namely binary
          classification. Must be > 1.
        weight_column: A string or a `_NumericColumn` created by
          `tf.feature_column.numeric_column` defining feature column representing
          weights. It is used to down weight or boost examples during training. It
          will be multiplied by the loss of the example. If it is a string, it is
          used as a key to fetch weight tensor from the `features`. If it is a
          `_NumericColumn`, raw tensor is fetched by key `weight_column.key`,
          then weight_column.normalizer_fn is applied on it to get weight tensor.
        label_vocabulary: A list of strings represents possible label values. If
          given, labels must be string type and have any value in
          `label_vocabulary`. If it is not given, that means labels are
          already encoded as integer or float within [0, 1] for `n_classes=2` and
          encoded as integer values in {0, 1,..., n_classes-1} for `n_classes`>2 .
          Also there will be errors if vocabulary is not provided and labels are
          string.
        input_layer_partitioner: Partitioner for input layer. Defaults to
          `min_max_variable_partitioner` with `min_slice_size` 64 << 20.
        config: RunConfig object to configure the runtime settings.
  
      Raises:
        ValueError: If both linear_feature_columns and dnn_features_columns are
          empty at the same time.
docstring_summary: Initializes a DNNLinearCombinedClassifier instance.
docstring_tokens: Initializes a DNNLinearCombinedClassifier instance .
function: def __init__(self,
                 model_dir=None,
                 linear_feature_columns=None,
                 linear_optimizer='Ftrl',
                 dnn_feature_columns=None,
                 dnn_optimizer='Adagrad',
                 dnn_hidden_units=None,
                 dnn_activation_fn=nn.relu,
                 dnn_dropout=None,
                 n_classes=2,
                 weight_column=None,
                 label_vocabulary=None,
                 input_layer_partitioner=None,
                 config=None):
      """Initializes a DNNLinearCombinedClassifier instance.
  
      Args:
        model_dir: Directory to save model parameters, graph and etc. This can
          also be used to load checkpoints from the directory into a estimator
          to continue training a previously saved model.
        linear_feature_columns: An iterable containing all the feature columns
          used by linear part of the model. All items in the set must be
          instances of classes derived from `FeatureColumn`.
        linear_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the linear part of the model. Defaults to FTRL optimizer.
        dnn_feature_columns: An iterable containing all the feature columns used
          by deep part of the model. All items in the set must be instances of
          classes derived from `FeatureColumn`.
        dnn_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the deep part of the model. Defaults to Adagrad optimizer.
        dnn_hidden_units: List of hidden units per layer. All layers are fully
          connected.
        dnn_activation_fn: Activation function applied to each layer. If None,
          will use `tf.nn.relu`.
        dnn_dropout: When not None, the probability we will drop out
          a given coordinate.
        n_classes: Number of label classes. Defaults to 2, namely binary
          classification. Must be > 1.
        weight_column: A string or a `_NumericColumn` created by
          `tf.feature_column.numeric_column` defining feature column representing
          weights. It is used to down weight or boost examples during training. It
          will be multiplied by the loss of the example. If it is a string, it is
          used as a key to fetch weight tensor from the `features`. If it is a
          `_NumericColumn`, raw tensor is fetched by key `weight_column.key`,
          then weight_column.normalizer_fn is applied on it to get weight tensor.
        label_vocabulary: A list of strings represents possible label values. If
          given, labels must be string type and have any value in
          `label_vocabulary`. If it is not given, that means labels are
          already encoded as integer or float within [0, 1] for `n_classes=2` and
          encoded as integer values in {0, 1,..., n_classes-1} for `n_classes`>2 .
          Also there will be errors if vocabulary is not provided and labels are
          string.
        input_layer_partitioner: Partitioner for input layer. Defaults to
          `min_max_variable_partitioner` with `min_slice_size` 64 << 20.
        config: RunConfig object to configure the runtime settings.
  
      Raises:
        ValueError: If both linear_feature_columns and dnn_features_columns are
          empty at the same time.
      """
      linear_feature_columns = linear_feature_columns or []
      dnn_feature_columns = dnn_feature_columns or []
      self._feature_columns = (
          list(linear_feature_columns) + list(dnn_feature_columns))
      if not self._feature_columns:
        raise ValueError('Either linear_feature_columns or dnn_feature_columns '
                         'must be defined.')
      if n_classes == 2:
        head = head_lib._binary_logistic_head_with_sigmoid_cross_entropy_loss(  # pylint: disable=protected-access
            weight_column=weight_column,
            label_vocabulary=label_vocabulary)
      else:
        head = head_lib._multi_class_head_with_softmax_cross_entropy_loss(  # pylint: disable=protected-access
            n_classes,
            weight_column=weight_column,
            label_vocabulary=label_vocabulary)
      def _model_fn(features, labels, mode, config):
        return _dnn_linear_combined_model_fn(
            features=features,
            labels=labels,
            mode=mode,
            head=head,
            linear_feature_columns=linear_feature_columns,
            linear_optimizer=linear_optimizer,
            dnn_feature_columns=dnn_feature_columns,
            dnn_optimizer=dnn_optimizer,
            dnn_hidden_units=dnn_hidden_units,
            dnn_activation_fn=dnn_activation_fn,
            dnn_dropout=dnn_dropout,
            input_layer_partitioner=input_layer_partitioner,
            config=config)
  
      super(DNNLinearCombinedClassifier, self).__init__(
          model_fn=_model_fn, model_dir=model_dir, config=config)
function_tokens: def __init__ ( self , model_dir = None , linear_feature_columns = None , linear_optimizer = 'Ftrl' , dnn_feature_columns = None , dnn_optimizer = 'Adagrad' , dnn_hidden_units = None , dnn_activation_fn = nn . relu , dnn_dropout = None , n_classes = 2 , weight_column = None , label_vocabulary = None , input_layer_partitioner = None , config = None ) : linear_feature_columns = linear_feature_columns or [ ] dnn_feature_columns = dnn_feature_columns or [ ] self . _feature_columns = ( list ( linear_feature_columns ) + list ( dnn_feature_columns ) ) if not self . _feature_columns : raise ValueError ( 'Either linear_feature_columns or dnn_feature_columns ' 'must be defined.' ) if n_classes == 2 : head = head_lib . _binary_logistic_head_with_sigmoid_cross_entropy_loss ( # pylint: disable=protected-access weight_column = weight_column , label_vocabulary = label_vocabulary ) else : head = head_lib . _multi_class_head_with_softmax_cross_entropy_loss ( # pylint: disable=protected-access n_classes , weight_column = weight_column , label_vocabulary = label_vocabulary ) def _model_fn ( features , labels , mode , config ) : return _dnn_linear_combined_model_fn ( features = features , labels = labels , mode = mode , head = head , linear_feature_columns = linear_feature_columns , linear_optimizer = linear_optimizer , dnn_feature_columns = dnn_feature_columns , dnn_optimizer = dnn_optimizer , dnn_hidden_units = dnn_hidden_units , dnn_activation_fn = dnn_activation_fn , dnn_dropout = dnn_dropout , input_layer_partitioner = input_layer_partitioner , config = config ) super ( DNNLinearCombinedClassifier , self ) . __init__ ( model_fn = _model_fn , model_dir = model_dir , config = config )