tf.contrib.distributions.Bernoulli.entropy()

tf.contrib.distributions.Bernoulli.entropy(name='entropy') Shanon entropy in nats.

tf.contrib.distributions.Bernoulli.dtype

tf.contrib.distributions.Bernoulli.dtype The DType of Tensors handled by this Distribution.

tf.contrib.distributions.Bernoulli.cdf()

tf.contrib.distributions.Bernoulli.cdf(value, name='cdf') Cumulative distribution function. Given random variable X, the cumulative distribution function cdf is: cdf(x) := P[X <= x] Args: value: float or double Tensor. name: The name to give this op. Returns: cdf: a Tensor of shape sample_shape(x) + self.batch_shape with values of type self.dtype.

tf.contrib.distributions.Bernoulli.batch_shape()

tf.contrib.distributions.Bernoulli.batch_shape(name='batch_shape') Shape of a single sample from a single event index as a 1-D Tensor. The product of the dimensions of the batch_shape is the number of independent distributions of this kind the instance represents. Args: name: name to give to the op Returns: batch_shape: Tensor.

tf.contrib.distributions.Bernoulli.allow_nan_stats

tf.contrib.distributions.Bernoulli.allow_nan_stats Python boolean describing behavior when a stat is undefined. Stats return +/- infinity when it makes sense. E.g., the variance of a Cauchy distribution is infinity. However, sometimes the statistic is undefined, e.g., if a distribution's pdf does not achieve a maximum within the support of the distribution, the mode is undefined. If the mean is undefined, then by definition the variance is undefined. E.g. the mean for Student's T for df = 1 is

tf.contrib.distributions.Bernoulli

class tf.contrib.distributions.Bernoulli Bernoulli distribution. The Bernoulli distribution is parameterized by p, the probability of a positive event.

tf.contrib.distributions.BaseDistribution.sample_n()

tf.contrib.distributions.BaseDistribution.sample_n(n, seed=None, name='sample') Generate n samples. Args: n: Scalar Tensor of type int32 or int64, the number of observations to sample. seed: Python integer seed for RNG name: name to give to the op. Returns: samples: a Tensor with a prepended dimension (n,). Raises: TypeError: if n is not an integer type.

tf.contrib.distributions.BaseDistribution.log_prob()

tf.contrib.distributions.BaseDistribution.log_prob(value, name='log_prob') Log probability density/mass function (depending on is_continuous). Args: value: float or double Tensor. name: The name to give this op. Returns: log_prob: a Tensor of shape sample_shape(x) + self.batch_shape with values of type self.dtype.

tf.contrib.distributions.BaseDistribution

class tf.contrib.distributions.BaseDistribution Simple abstract base class for probability distributions. Implementations of core distributions to be included in the distributions module should subclass Distribution. This base class may be useful to users that want to fulfill a simpler distribution contract.

tf.contrib.crf.viterbi_decode()

tf.contrib.crf.viterbi_decode(score, transition_params) Decode the highest scoring sequence of tags outside of TensorFlow. This should only be used at test time. Args: score: A [seq_len, num_tags] matrix of unary potentials. transition_params: A [num_tags, num_tags] matrix of binary potentials. Returns: viterbi: A [seq_len] list of integers containing the highest scoring tag indicies. viterbi_score: A float containing the score for the viterbi sequence.