54e07bdb2ba299fd6f364289510612f2fe6af8ff,tensorflow_transform/analyzers.py,,pca,#Any#Any#Any#Any#,1423

Before Change


  x.shape.assert_has_rank(2)

  input_dim = x.shape.as_list()[1]
  shape = (input_dim, output_dim)

  combiner = PCACombiner(output_dim, dtype.as_numpy_dtype)
  if name is None:
    name = "pca"
  return apply_combiner([x], [dtype], [shape], combiner, name)[0]

After Change


  if not isinstance(x, tf.Tensor):
    raise TypeError("Expected a Tensor, but got %r" % x)

  with tf.name_scope(name, "pca"):
    x.shape.assert_has_rank(2)

    input_dim = x.shape.as_list()[1]
    shape = (input_dim, output_dim)

    (result,) = apply_analyzer(
        analyzer_nodes.Combine,
        x,
        combiner=PCACombiner(output_dim, dtype.as_numpy_dtype, shape))
    return result


def ptransform_analyzer(inputs, output_dtypes, output_shapes, ptransform,
                        name=None):
  Applies a user-provided PTransform over the whole dataset.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: tensorflow/transform
Commit Name: 54e07bdb2ba299fd6f364289510612f2fe6af8ff
Time: 2018-11-28
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/analyzers.py
Class Name:
Method Name: pca


Project Name: tensorflow/transform
Commit Name: 54e07bdb2ba299fd6f364289510612f2fe6af8ff
Time: 2018-11-28
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/analyzers.py
Class Name:
Method Name: pca


Project Name: tensorflow/transform
Commit Name: 54e07bdb2ba299fd6f364289510612f2fe6af8ff
Time: 2018-11-28
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/analyzers.py
Class Name:
Method Name: quantiles


Project Name: tensorflow/transform
Commit Name: 54e07bdb2ba299fd6f364289510612f2fe6af8ff
Time: 2018-11-28
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/analyzers.py
Class Name:
Method Name: covariance