tf.contrib.learn.LinearRegressor.__init__()

tf.contrib.learn.LinearRegressor.__init__(feature_columns, model_dir=None, weight_column_name=None, optimizer=None, gradient_clip_norm=None, enable_centered_bias=None, target_dimension=1, _joint_weights=False, config=None)

Construct a LinearRegressor estimator object.

Args:
  • 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.
  • model_dir: Directory to save model parameters, graph, etc. This can also be used to load checkpoints from the directory into a estimator to continue training a previously saved model.
  • weight_column_name: A string defining feature column name representing weights. It is used to down weight or boost examples during training. It will be multiplied by the loss of the example.
  • optimizer: An instance of tf.Optimizer used to train the model. If None, will use an Ftrl optimizer.
  • gradient_clip_norm: A float > 0. If provided, gradients are clipped to their global norm with this clipping ratio. See tf.clip_by_global_norm for more details.
  • enable_centered_bias: A bool. If True, estimator will learn a centered bias variable for each class. Rest of the model structure learns the residual after centered bias.
  • target_dimension: dimension of the target for multilabels. _joint_weights: If True use a single (possibly partitioned) variable to store the weights. It's faster, but requires all feature columns are sparse and have the 'sum' combiner. Incompatible with SDCAOptimizer.

  • config: RunConfig object to configure the runtime settings.

Returns:

A LinearRegressor estimator.

doc_TensorFlow
2016-10-14 13:05:57
Comments
Leave a Comment

Please login to continue.