parameters: (self,
                 params,
                 device_assigner=None,
                 model_dir=None,
                 feature_columns=None,
                 graph_builder_class=tensor_forest.RandomForestGraphs,
                 config=None,
                 weight_column=None,
                 keys_column=None,
                 feature_engineering_fn=None,
                 early_stopping_rounds=100,
                 early_stopping_loss_threshold=0.001,
                 num_trainers=1,
                 trainer_id=0,
                 report_feature_importances=False,
                 local_eval=False,
                 version=None,
                 head=None,
                 include_all_in_serving=False)
docstring: Initializes a TensorForestEstimator instance.
  
      Args:
        params: ForestHParams object that holds random forest hyperparameters.
          These parameters will be passed into `model_fn`.
        device_assigner: An `object` instance that controls how trees get
          assigned to devices. If `None`, will use
          `tensor_forest.RandomForestDeviceAssigner`.
        model_dir: Directory to save model parameters, graph, etc. To continue
          training a previously saved model, load checkpoints saved to this
          directory into an estimator.
        feature_columns: An iterable containing all the feature columns used by
          the model. All items in the set should be instances of classes derived
          from `_FeatureColumn`.
        graph_builder_class: An `object` instance that defines how TF graphs for
          random forest training and inference are built. By default will use
          `tensor_forest.RandomForestGraphs`. Can be overridden by version
          kwarg.
        config: `RunConfig` object to configure the runtime settings.
        weight_column: A string defining feature column name representing
          weights. Will be multiplied by the loss of the example. Used to
          downweight or boost examples during training.
        keys_column: A string naming one of the features to strip out and
          pass through into the inference/eval results dict.  Useful for
          associating specific examples with their prediction.
        feature_engineering_fn: Feature engineering function. Takes features and
          labels which are the output of `input_fn` and returns features and
          labels which will be fed into the model.
        early_stopping_rounds: Allows training to terminate early if the forest is
          no longer growing. 100 by default.  Set to a Falsy value to disable
          the default training hook.
        early_stopping_loss_threshold: Percentage (as fraction) that loss must
          improve by within early_stopping_rounds steps, otherwise training will
          terminate.
        num_trainers: Number of training jobs, which will partition trees
          among them.
        trainer_id: Which trainer this instance is.
        report_feature_importances: If True, print out feature importances
          during evaluation.
        local_eval: If True, don't use a device assigner for eval. This is to
          support some common setups where eval is done on a single machine, even
          though training might be distributed.
        version: Unused.
        head: A heads_lib.Head object that calculates losses and such. If None,
          one will be automatically created based on params.
        include_all_in_serving: if True, allow preparation of the complete
          prediction dict including the variance to be exported for serving with
          the Servo lib; and it also requires calling export_savedmodel with
          default_output_alternative_key=ALL_SERVING_KEY, i.e.
          estimator.export_savedmodel(export_dir_base=your_export_dir,
            serving_input_fn=your_export_input_fn,
            default_output_alternative_key=ALL_SERVING_KEY)
          if False, resort to default behavior, i.e. export scores and
            probabilities but no variances. In this case
            default_output_alternative_key should be None while calling
            export_savedmodel().
          Note, that due to backward compatibility we cannot always set
          include_all_in_serving to True because in this case calling
          export_saved_model() without
          default_output_alternative_key=ALL_SERVING_KEY (legacy behavior) the
          saved_model_export_utils.get_output_alternatives() would raise
          ValueError.
  
      Returns:
        A `TensorForestEstimator` instance.
docstring_summary: Initializes a TensorForestEstimator instance.
docstring_tokens: Initializes a TensorForestEstimator instance .
function: def __init__(self,
                 params,
                 device_assigner=None,
                 model_dir=None,
                 feature_columns=None,
                 graph_builder_class=tensor_forest.RandomForestGraphs,
                 config=None,
                 weight_column=None,
                 keys_column=None,
                 feature_engineering_fn=None,
                 early_stopping_rounds=100,
                 early_stopping_loss_threshold=0.001,
                 num_trainers=1,
                 trainer_id=0,
                 report_feature_importances=False,
                 local_eval=False,
                 version=None,
                 head=None,
                 include_all_in_serving=False):
      """Initializes a TensorForestEstimator instance.
  
      Args:
        params: ForestHParams object that holds random forest hyperparameters.
          These parameters will be passed into `model_fn`.
        device_assigner: An `object` instance that controls how trees get
          assigned to devices. If `None`, will use
          `tensor_forest.RandomForestDeviceAssigner`.
        model_dir: Directory to save model parameters, graph, etc. To continue
          training a previously saved model, load checkpoints saved to this
          directory into an estimator.
        feature_columns: An iterable containing all the feature columns used by
          the model. All items in the set should be instances of classes derived
          from `_FeatureColumn`.
        graph_builder_class: An `object` instance that defines how TF graphs for
          random forest training and inference are built. By default will use
          `tensor_forest.RandomForestGraphs`. Can be overridden by version
          kwarg.
        config: `RunConfig` object to configure the runtime settings.
        weight_column: A string defining feature column name representing
          weights. Will be multiplied by the loss of the example. Used to
          downweight or boost examples during training.
        keys_column: A string naming one of the features to strip out and
          pass through into the inference/eval results dict.  Useful for
          associating specific examples with their prediction.
        feature_engineering_fn: Feature engineering function. Takes features and
          labels which are the output of `input_fn` and returns features and
          labels which will be fed into the model.
        early_stopping_rounds: Allows training to terminate early if the forest is
          no longer growing. 100 by default.  Set to a Falsy value to disable
          the default training hook.
        early_stopping_loss_threshold: Percentage (as fraction) that loss must
          improve by within early_stopping_rounds steps, otherwise training will
          terminate.
        num_trainers: Number of training jobs, which will partition trees
          among them.
        trainer_id: Which trainer this instance is.
        report_feature_importances: If True, print out feature importances
          during evaluation.
        local_eval: If True, don't use a device assigner for eval. This is to
          support some common setups where eval is done on a single machine, even
          though training might be distributed.
        version: Unused.
        head: A heads_lib.Head object that calculates losses and such. If None,
          one will be automatically created based on params.
        include_all_in_serving: if True, allow preparation of the complete
          prediction dict including the variance to be exported for serving with
          the Servo lib; and it also requires calling export_savedmodel with
          default_output_alternative_key=ALL_SERVING_KEY, i.e.
          estimator.export_savedmodel(export_dir_base=your_export_dir,
            serving_input_fn=your_export_input_fn,
            default_output_alternative_key=ALL_SERVING_KEY)
          if False, resort to default behavior, i.e. export scores and
            probabilities but no variances. In this case
            default_output_alternative_key should be None while calling
            export_savedmodel().
          Note, that due to backward compatibility we cannot always set
          include_all_in_serving to True because in this case calling
          export_saved_model() without
          default_output_alternative_key=ALL_SERVING_KEY (legacy behavior) the
          saved_model_export_utils.get_output_alternatives() would raise
          ValueError.
  
      Returns:
        A `TensorForestEstimator` instance.
      """
      # Override default number of trainers if config is provided.
      if num_trainers == 1 and config is not None:
        num_trainers = max(1, config.num_worker_replicas)
      if trainer_id == 0 and config is not None:
        trainer_id = config.global_id_in_cluster
  
      super(CoreTensorForestEstimator, self).__init__(
          model_fn=get_model_fn(
              params.fill(),
              graph_builder_class,
              device_assigner,
              feature_columns=feature_columns,
              model_head=head,
              weights_name=weight_column,
              keys_name=keys_column,
              early_stopping_rounds=early_stopping_rounds,
              early_stopping_loss_threshold=early_stopping_loss_threshold,
              num_trainers=num_trainers,
              trainer_id=trainer_id,
              report_feature_importances=report_feature_importances,
              local_eval=local_eval,
              include_all_in_serving=include_all_in_serving,
              output_type=ModelBuilderOutputType.ESTIMATOR_SPEC),
          model_dir=model_dir,
          config=config)
function_tokens: def __init__ ( self , params , device_assigner = None , model_dir = None , feature_columns = None , graph_builder_class = tensor_forest . RandomForestGraphs , config = None , weight_column = None , keys_column = None , feature_engineering_fn = None , early_stopping_rounds = 100 , early_stopping_loss_threshold = 0.001 , num_trainers = 1 , trainer_id = 0 , report_feature_importances = False , local_eval = False , version = None , head = None , include_all_in_serving = False ) : # Override default number of trainers if config is provided. if num_trainers == 1 and config is not None : num_trainers = max ( 1 , config . num_worker_replicas ) if trainer_id == 0 and config is not None : trainer_id = config . global_id_in_cluster super ( CoreTensorForestEstimator , self ) . __init__ ( model_fn = get_model_fn ( params . fill ( ) , graph_builder_class , device_assigner , feature_columns = feature_columns , model_head = head , weights_name = weight_column , keys_name = keys_column , early_stopping_rounds = early_stopping_rounds , early_stopping_loss_threshold = early_stopping_loss_threshold , num_trainers = num_trainers , trainer_id = trainer_id , report_feature_importances = report_feature_importances , local_eval = local_eval , include_all_in_serving = include_all_in_serving , output_type = ModelBuilderOutputType . ESTIMATOR_SPEC ) , model_dir = model_dir , config = config )