<commit_before># Creating Estimators in tf.estimator

The tf.estimator framework makes it easy to construct and train machine
learning models via its high-level Estimator API. `Estimator`
offers classes you can instantiate to quickly configure common model types such
as regressors and classifiers:

*   @{tf.estimator.LinearClassifier}:
    Constructs a linear classification model.
*   @{tf.estimator.LinearRegressor}:
    Constructs a linear regression model.
*   @{tf.estimator.DNNClassifier}:
    Construct a neural network classification model.
*   @{tf.estimator.DNNRegressor}:
    Construct a neural network regression model.
*   @{tf.estimator.DNNLinearCombinedClassifier}:
    Construct a neural network and linear combined classification model.
*   @{tf.estimator.DNNRegressor}:
    Construct a neural network and linear combined regression model.

But what if none of `tf.estimator`'s predefined model types meets your needs?
Perhaps you need more granular control over model configuration, such as
the ability to customize the loss function used for optimization, or specify
different activation functions for each neural network layer. Or maybe you're
implementing a ranking or recommendation system, and neither a classifier nor a
regressor is appropriate for generating predictions.

This tutorial covers how to create your own `Estimator` using the building
blocks provided in `tf.estimator`, which will predict the ages of
[abalones](https://en.wikipedia.org/wiki/Abalone) based on their physical
measurements. You'll learn how to do the following:

*   Instantiate an `Estimator`
*   Construct a custom model function
*   Configure a neural network using `tf.feature_column` and `tf.layers`<commit_msg>docs: Fix link to tf.estimator.DNNLinearCombinedRegressor (#12907)<commit_after># Creating Estimators in tf.estimator

The tf.estimator framework makes it easy to construct and train machine
learning models via its high-level Estimator API. `Estimator`
offers classes you can instantiate to quickly configure common model types such
as regressors and classifiers:

*   @{tf.estimator.LinearClassifier}:
    Constructs a linear classification model.
*   @{tf.estimator.LinearRegressor}:
    Constructs a linear regression model.
*   @{tf.estimator.DNNClassifier}:
    Construct a neural network classification model.
*   @{tf.estimator.DNNRegressor}:
    Construct a neural network regression model.
*   @{tf.estimator.DNNLinearCombinedClassifier}:
    Construct a neural network and linear combined classification model.
*   @{tf.estimator.DNNLinearCombinedRegressor}:
    Construct a neural network and linear combined regression model.

But what if none of `tf.estimator`'s predefined model types meets your needs?
Perhaps you need more granular control over model configuration, such as
the ability to customize the loss function used for optimization, or specify
different activation functions for each neural network layer. Or maybe you're
implementing a ranking or recommendation system, and neither a classifier nor a
regressor is appropriate for generating predictions.

This tutorial covers how to create your own `Estimator` using the building
blocks provided in `tf.estimator`, which will predict the ages of
[abalones](https://en.wikipedia.org/wiki/Abalone) based on their physical
measurements. You'll learn how to do the following:

*   Instantiate an `Estimator`
*   Construct a custom model function
*   Configure a neural network using `tf.feature_column` and `tf.layers`
{'fraction_non_alphanumeric': 0.05927614705044172, 'fraction_numerical': 0.0014249073810202336, 'mean_word_length': 4.9491525423728815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3300080', 'n_tokens_mistral': 942, 'n_tokens_neox': 881, 'n_words': 406}