tf.contrib.factorization.GmmAlgorithm
Stay organized with collections
Save and categorize content based on your preferences.
Tensorflow Gaussian mixture model clustering class.
tf.contrib.factorization.GmmAlgorithm(
data, num_classes, initial_means=None, params='wmc',
covariance_type=FULL_COVARIANCE, random_seed=0
)
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.
|
Methods
alphas
View source
alphas()
assignments
View source
assignments()
Returns a list of Tensors with the matrix of assignments per shard.
clusters
View source
clusters()
Returns the clusters with dimensions num_classes X 1 X num_dimensions.
covariances
View source
covariances()
Returns the covariances matrices.
init_ops
View source
init_ops()
Returns the initialization operation.
is_initialized
View source
is_initialized()
Returns a boolean operation for initialized variables.
log_likelihood_op
View source
log_likelihood_op()
Returns the log-likelihood operation.
scores
View source
scores()
Returns the per-sample likelihood fo the data.
Returns |
Log probabilities of each data point.
|
training_ops
View source
training_ops()
Returns the training operation.
Class Variables
CLUSTERS_COVS_VARIABLE = 'clusters_covs'
CLUSTERS_VARIABLE = 'clusters'
CLUSTERS_WEIGHT = 'alphas'
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.factorization.GmmAlgorithm\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L92-L459) |\n\nTensorflow Gaussian mixture model clustering class. \n\n tf.contrib.factorization.GmmAlgorithm(\n data, num_classes, initial_means=None, params='wmc',\n covariance_type=FULL_COVARIANCE, random_seed=0\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `data` | a list of Tensors with data, each row is a new example. |\n| `num_classes` | number of clusters. |\n| `initial_means` | a Tensor with a matrix of means. If None, means are computed by sampling randomly. |\n| `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. |\n| `covariance_type` | one of \"full\", \"diag\". |\n| `random_seed` | Seed for PRNG used to initialize seeds. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|---|---|\n| Exception if covariance type is unknown. ||\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `alphas`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L235-L236) \n\n alphas()\n\n### `assignments`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L246-L251) \n\n assignments()\n\nReturns a list of Tensors with the matrix of assignments per shard.\n\n### `clusters`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L238-L240) \n\n clusters()\n\nReturns the clusters with dimensions num_classes X 1 X num_dimensions.\n\n### `covariances`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L242-L244) \n\n covariances()\n\nReturns the covariances matrices.\n\n### `init_ops`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L223-L225) \n\n init_ops()\n\nReturns the initialization operation.\n\n### `is_initialized`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L231-L233) \n\n is_initialized()\n\nReturns a boolean operation for initialized variables.\n\n### `log_likelihood_op`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L261-L263) \n\n log_likelihood_op()\n\nReturns the log-likelihood operation.\n\n### `scores`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L253-L259) \n\n scores()\n\nReturns the per-sample likelihood fo the data.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| Log probabilities of each data point. ||\n\n\u003cbr /\u003e\n\n### `training_ops`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L227-L229) \n\n training_ops()\n\nReturns the training operation.\n\nClass Variables\n---------------\n\n- `CLUSTERS_COVS_VARIABLE = 'clusters_covs'`\n- `CLUSTERS_VARIABLE = 'clusters'`\n- `CLUSTERS_WEIGHT = 'alphas'`"]]