Description Usage Arguments See Also
Construct a linear model, which can be used to predict a continuous outcome
(in the case of linear_regressor()
) or a categorical outcome (in the case
of linear_classifier()
).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | linear_regressor(
feature_columns,
model_dir = NULL,
label_dimension = 1L,
weight_column = NULL,
optimizer = "Ftrl",
config = NULL,
partitioner = NULL
)
linear_classifier(
feature_columns,
model_dir = NULL,
n_classes = 2L,
weight_column = NULL,
label_vocabulary = NULL,
optimizer = "Ftrl",
config = NULL,
partitioner = NULL
)
|
feature_columns |
An R list containing all of the feature columns used
by the model (typically, generated by |
model_dir |
Directory to save the model parameters, graph, and so on. This can also be used to load checkpoints from the directory into a estimator to continue training a previously saved model. |
label_dimension |
Number of regression targets per example. This is the
size of the last dimension of the labels and logits |
weight_column |
A string, or a numeric column created by
|
optimizer |
Either the name of the optimizer to be used when training the model, or a TensorFlow optimizer instance. Defaults to the FTRL optimizer. |
config |
A run configuration created by |
partitioner |
An optional partitioner for the input layer. |
n_classes |
The number of label classes. |
label_vocabulary |
A list of strings represents possible label values.
If given, labels must be string type and have any value in
|
Other canned estimators:
boosted_trees_estimators
,
dnn_estimators
,
dnn_linear_combined_estimators
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.