W3cubDocs

/TensorFlow Python

tf.contrib.factorization.GmmAlgorithm

Class GmmAlgorithm

Defined in tensorflow/contrib/factorization/python/ops/gmm_ops.py.

Tensorflow Gaussian mixture model clustering class.

Methods

__init__

__init__(
    data,
    num_classes,
    initial_means=None,
    params='wmc',
    covariance_type=FULL_COVARIANCE,
    random_seed=0
)

Constructor.

Args:

  • data: a list of Tensors with data, each row is a new example.
  • num_classes: number of clusters.
  • initial_means: a Tensor with a matrix of means. If None, means are computed by sampling randomly.
  • params: Controls which parameters are updated in the training process. Can contain any combination of "w" for weights, "m" for means, and "c" for covariances.
  • covariance_type: one of "full", "diag".
  • random_seed: Seed for PRNG used to initialize seeds.

Raises:

Exception if covariance type is unknown.

alphas

alphas()

assignments

assignments()

Returns a list of Tensors with the matrix of assignments per shard.

clusters

clusters()

Returns the clusters with dimensions num_classes X 1 X num_dimensions.

covariances

covariances()

Returns the covariances matrices.

init_ops

init_ops()

Returns the initialization operation.

is_initialized

is_initialized()

Returns a boolean operation for initialized variables.

log_likelihood_op

log_likelihood_op()

Returns the log-likelihood operation.

scores

scores()

Returns the per-sample likelihood fo the data.

Returns:

Log probabilities of each data point.

training_ops

training_ops()

Returns the training operation.

Class Members

CLUSTERS_COVS_VARIABLE

CLUSTERS_VARIABLE

CLUSTERS_WEIGHT

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/factorization/GmmAlgorithm