You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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",
85
79
"\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",
87
81
"\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",
89
83
"\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",
91
85
"\n",
92
-
"[Install TensorFlow](tensorlfow.org/install) if you haven't already.\n",
86
+
"## Setup\n",
93
87
"\n",
94
-
"Next import the relavant packages:"
88
+
"To try this tutorial, first import the relavant packages:"
95
89
]
96
90
},
97
91
{
@@ -119,6 +113,17 @@
119
113
"colab_type": "text"
120
114
},
121
115
"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",
122
127
"source": [
123
128
"Download the [tutorial code from github](https://github.com/tensorflow/models/tree/master/official/wide_deep/),\n",
124
129
" add the root directory to your python path, and jump to the `wide_deep` directory:"
@@ -159,7 +164,7 @@
159
164
},
160
165
"cell_type": "markdown",
161
166
"source": [
162
-
"Execute the data download script:"
167
+
"Download the dataset:"
163
168
]
164
169
},
165
170
{
@@ -185,6 +190,10 @@
185
190
},
186
191
"cell_type": "markdown",
187
192
"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",
188
197
"To execute the tutorial code from the command line first add the path to tensorflow/models to your `PYTHONPATH`."
189
198
]
190
199
},
@@ -248,15 +257,23 @@
248
257
"execution_count": 0,
249
258
"outputs": []
250
259
},
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
+
},
251
270
{
252
271
"metadata": {
253
272
"id": "AmZ4CpaOcYvV",
254
273
"colab_type": "text"
255
274
},
256
275
"cell_type": "markdown",
257
276
"source": [
258
-
"Read on to find out how this code builds its linear model.\n",
259
-
"\n",
260
277
"## Reading The Census Data\n",
261
278
"\n",
262
279
"The dataset we're using is the\n",
@@ -1302,28 +1319,16 @@
1302
1319
},
1303
1320
"cell_type": "markdown",
1304
1321
"source": [
1305
-
"## What Next\n",
1322
+
"## Next Steps\n",
1306
1323
"\n",
1307
-
"For more about estimators:\n",
1324
+
"For more about estimators see:\n",
1308
1325
"\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",
1310
1328
"- The [Gradient-boosted-trees estimator tutorial](https://github.com/tensorflow/models/tree/master/official/boosted_trees)\n",
1311
1329
"- This [blog post]( https://medium.com/tensorflow/classifying-text-with-tensorflow-estimators) on processing text with `Estimators`\n",
1312
1330
"- How to [build a custom CNN estimator](https://www.tensorflow.org/tutorials/estimators/cnn)"
0 commit comments