aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples/learn
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-06-28 10:00:26 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-28 10:04:09 -0700
commit9a45d4d6bab843424c3994798fc7fa4e1e04db56 (patch)
tree8e11fd89e77d0b978fafbdf381d12fcd8f1d1afb /tensorflow/examples/learn
parent17c5907a0f35cc2644737478137ed2b558998da9 (diff)
Deletes iris_with_pipeline example, because core estimators are not compatible with sklearn.
PiperOrigin-RevId: 160420406
Diffstat (limited to 'tensorflow/examples/learn')
-rw-r--r--tensorflow/examples/learn/BUILD8
-rw-r--r--tensorflow/examples/learn/README.md1
-rwxr-xr-xtensorflow/examples/learn/examples_test.sh1
-rw-r--r--tensorflow/examples/learn/iris_with_pipeline.py54
4 files changed, 0 insertions, 64 deletions
diff --git a/tensorflow/examples/learn/BUILD b/tensorflow/examples/learn/BUILD
index 7371e96560..23a42a60ba 100644
--- a/tensorflow/examples/learn/BUILD
+++ b/tensorflow/examples/learn/BUILD
@@ -55,13 +55,6 @@ py_binary(
)
py_binary(
- name = "iris_with_pipeline",
- srcs = ["iris_with_pipeline.py"],
- srcs_version = "PY2AND3",
- deps = ["//tensorflow:tensorflow_py"],
-)
-
-py_binary(
name = "random_forest_mnist",
srcs = ["random_forest_mnist.py"],
srcs_version = "PY2AND3",
@@ -154,7 +147,6 @@ sh_test(
":iris_custom_decay_dnn",
":iris_custom_model",
":iris_run_config",
- ":iris_with_pipeline",
":random_forest_mnist",
":resnet",
":text_classification",
diff --git a/tensorflow/examples/learn/README.md b/tensorflow/examples/learn/README.md
index 6671d68831..416b809bb1 100644
--- a/tensorflow/examples/learn/README.md
+++ b/tensorflow/examples/learn/README.md
@@ -19,7 +19,6 @@ processing (`sudo pip install pandas`).
## Techniques
-* [Using skflow with Pipeline]( https://www.tensorflow.org/code/tensorflow/examples/learn/iris_with_pipeline.py)
* [Deep Neural Network with Customized Decay Function]( https://www.tensorflow.org/code/tensorflow/examples/learn/iris_custom_decay_dnn.py)
## Specialized Models
diff --git a/tensorflow/examples/learn/examples_test.sh b/tensorflow/examples/learn/examples_test.sh
index 4c5893384a..b8763de471 100755
--- a/tensorflow/examples/learn/examples_test.sh
+++ b/tensorflow/examples/learn/examples_test.sh
@@ -49,7 +49,6 @@ test iris
test iris_custom_decay_dnn
test iris_custom_model
test iris_run_config
-test iris_with_pipeline
test random_forest_mnist
test resnet
test text_classification --test_with_fake_data
diff --git a/tensorflow/examples/learn/iris_with_pipeline.py b/tensorflow/examples/learn/iris_with_pipeline.py
deleted file mode 100644
index 7ba958d85b..0000000000
--- a/tensorflow/examples/learn/iris_with_pipeline.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Example of DNNClassifier for Iris plant dataset, with pipeline."""
-
-from __future__ import absolute_import
-from __future__ import division
-from __future__ import print_function
-
-from sklearn import cross_validation
-from sklearn.datasets import load_iris
-from sklearn.metrics import accuracy_score
-from sklearn.pipeline import Pipeline
-from sklearn.preprocessing import StandardScaler
-import tensorflow as tf
-
-learn = tf.contrib.learn
-
-
-def main(unused_argv):
- iris = load_iris()
- x_train, x_test, y_train, y_test = cross_validation.train_test_split(
- iris.data, iris.target, test_size=0.2, random_state=42)
-
- # It's useful to scale to ensure Stochastic Gradient Descent
- # will do the right thing.
- scaler = StandardScaler()
-
- # DNN classifier.
- classifier = learn.DNNClassifier(
- feature_columns=learn.infer_real_valued_columns_from_input(x_train),
- hidden_units=[10, 20, 10],
- n_classes=3)
-
- pipeline = Pipeline([('scaler', scaler), ('DNNclassifier', classifier)])
-
- pipeline.fit(x_train, y_train, DNNclassifier__steps=200)
-
- score = accuracy_score(y_test, list(pipeline.predict(x_test)))
- print('Accuracy: {0:f}'.format(score))
-
-
-if __name__ == '__main__':
- tf.app.run()