Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f5c10c

Browse files
committed
Resolve review comments.
1 parent 02a30e2 commit 0f5c10c

File tree

1 file changed

+37
-32
lines changed

1 file changed

+37
-32
lines changed

samples/core/tutorials/estimators/wide.ipynb

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
},
5959
"cell_type": "markdown",
6060
"source": [
61-
"# TensorFlow Linear Model Tutorial\n",
61+
"# Build a classifier using Estimators\n",
6262
"\n",
6363
"<table class=\"tfo-notebook-buttons\" align=\"left\"><td>\n",
6464
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/models/blob/master/samples/core/tutorials/estimators/wide.ipynb\">\n",
@@ -75,23 +75,17 @@
7575
"cell_type": "markdown",
7676
"source": [
7777
"In this tutorial, we will use the `tf.estimator` API in TensorFlow to solve a\n",
78-
"standard benchmark binary classification problem: Given census data about a \n",
79-
"person such as age, education, marital status, and occupation (the features),\n",
80-
"we will try to predict whether or not the person earns more than 50,000 dollars\n",
81-
"a year (the target label). We will train a **logistic regression** model, and given \n",
82-
"an individual's information our model will output a number between 0 and 1, which\n",
83-
"can be interpreted as the probability that the individual has an annual income of over\n",
84-
"50,000 dollars.\n",
78+
"benchmark binary classification problem.\n",
8579
"\n",
86-
"Key Point: As a modeler and developer, think about how this data is used and the potential benefits and harm a model's predictions can cause. A model like this could reinforce societal biases and disparities. Is each feature relevant to the problem you want to solve or will it introduce bias? For more information, read about [ML fairness](https://developers.google.com/machine-learning/fairness-overview/).\n",
80+
"Estimators are TensorFlow's most scalable and production oriented type of model. For more information see the [Estimator guide](../../guide/estimators).\n",
8781
"\n",
88-
"## Setup\n",
82+
"The problem is: Given census data about a person such as age, education, marital status, and occupation (the features), we will try to predict whether or not the person earns more than 50,000 dollars a year (the target label). We will train a **logistic regression** model, and given an individual's information our model will output a number between 0 and 1, which can be interpreted as the probability that the individual has an annual income of over 50,000 dollars.\n",
8983
"\n",
90-
"To try the code for this tutorial:\n",
84+
"Key Point: As a modeler and developer, think about how this data is used and the potential benefits and harm a model's predictions can cause. A model like this could reinforce societal biases and disparities. Is each feature relevant to the problem you want to solve or will it introduce bias? For more information, read about [ML fairness](https://developers.google.com/machine-learning/fairness-overview/).\n",
9185
"\n",
92-
"[Install TensorFlow](tensorlfow.org/install) if you haven't already.\n",
86+
"## Setup\n",
9387
"\n",
94-
"Next import the relavant packages:"
88+
"To try this tutorial, first import the relavant packages:"
9589
]
9690
},
9791
{
@@ -119,6 +113,17 @@
119113
"colab_type": "text"
120114
},
121115
"cell_type": "markdown",
116+
"source": [
117+
"## Official implementation\n",
118+
"\n"
119+
]
120+
},
121+
{
122+
"metadata": {
123+
"id": "tJqF5E6rtyCI",
124+
"colab_type": "text"
125+
},
126+
"cell_type": "markdown",
122127
"source": [
123128
"Download the [tutorial code from github](https://github.com/tensorflow/models/tree/master/official/wide_deep/),\n",
124129
" add the root directory to your python path, and jump to the `wide_deep` directory:"
@@ -159,7 +164,7 @@
159164
},
160165
"cell_type": "markdown",
161166
"source": [
162-
"Execute the data download script:"
167+
"Download the dataset:"
163168
]
164169
},
165170
{
@@ -185,6 +190,10 @@
185190
},
186191
"cell_type": "markdown",
187192
"source": [
193+
"### Command line usage\n",
194+
"\n",
195+
"The repo includes a complete program for experimenting with this type of model.\n",
196+
"\n",
188197
"To execute the tutorial code from the command line first add the path to tensorflow/models to your `PYTHONPATH`."
189198
]
190199
},
@@ -248,15 +257,23 @@
248257
"execution_count": 0,
249258
"outputs": []
250259
},
260+
{
261+
"metadata": {
262+
"id": "Uo2qoafut4MK",
263+
"colab_type": "text"
264+
},
265+
"cell_type": "markdown",
266+
"source": [
267+
"Read on to find out how this code builds its models."
268+
]
269+
},
251270
{
252271
"metadata": {
253272
"id": "AmZ4CpaOcYvV",
254273
"colab_type": "text"
255274
},
256275
"cell_type": "markdown",
257276
"source": [
258-
"Read on to find out how this code builds its linear model.\n",
259-
"\n",
260277
"## Reading The Census Data\n",
261278
"\n",
262279
"The dataset we're using is the\n",
@@ -1302,28 +1319,16 @@
13021319
},
13031320
"cell_type": "markdown",
13041321
"source": [
1305-
"## What Next\n",
1322+
"## Next Steps\n",
13061323
"\n",
1307-
"For more about estimators:\n",
1324+
"For more about estimators see:\n",
13081325
"\n",
1309-
"- The [TensorFlow Hub text classification tutorial](https://www.tensorflow.org/hub/tutorials/text_classification_with_tf_hub) uses `hub.text_embedding_column` to easily ingest free form text. \n",
1326+
"- The [Estimator Guide](tensorlfow.org/guide/estimators).\n",
1327+
"- The [TensorFlow Hub text classification tutorial](https://www.tensorflow.org/hub/tutorials/text_classification_with_tf_hub), which uses `hub.text_embedding_column` to easily ingest free form text. \n",
13101328
"- The [Gradient-boosted-trees estimator tutorial](https://github.com/tensorflow/models/tree/master/official/boosted_trees)\n",
13111329
"- This [blog post]( https://medium.com/tensorflow/classifying-text-with-tensorflow-estimators) on processing text with `Estimators`\n",
13121330
"- How to [build a custom CNN estimator](https://www.tensorflow.org/tutorials/estimators/cnn)"
13131331
]
1314-
},
1315-
{
1316-
"metadata": {
1317-
"id": "amMnupRPVtsa",
1318-
"colab_type": "code",
1319-
"colab": {}
1320-
},
1321-
"cell_type": "code",
1322-
"source": [
1323-
""
1324-
],
1325-
"execution_count": 0,
1326-
"outputs": []
13271332
}
13281333
]
13291334
}

0 commit comments

Comments
 (0)