from tensorflow.contrib.learn.python.learn.estimators import test_data

                        iris.data[:, i], dtype=dtypes.float32), (-1, 1))
        })
      # The following shows how to provide the SparseTensor data for
      # a SparseColumn.
      features['dummy_sparse_column'] = sparse_tensor.SparseTensor(
          values=('en', 'fr', 'zh'),
          indices=((0, 0), (0, 1), (60, 0)),
          dense_shape=(len(iris.target), 2))
      labels = array_ops.reshape(
          constant_op.constant(
              iris.target, dtype=dtypes.int32), (-1, 1))
      return features, labels

    iris = test_data.prepare_iris_data_for_logistic_regression()
    cont_features = [
        feature_column.real_valued_column(str(i)) for i in range(4)
    ]
    linear_features = [
        feature_column.bucketized_column(
            cont_features[i],
            test_data.get_quantile_based_buckets(iris.data[:, i], 10))
        for i in range(4)
    ]
    linear_features.append(
        feature_column.sparse_column_with_hash_bucket(
            'dummy_sparse_column', hash_bucket_size=100))
