LostTech.TensorFlow : API Documentation

Type Binomial

Namespace tensorflow.contrib.distributions

Parent Distribution

Interfaces IBinomial

Binomial distribution.

This distribution is parameterized by `probs`, a (batch of) probabilities for drawing a `1` and `total_count`, the number of trials per draw from the Binomial.

#### Mathematical Details

The Binomial is a distribution over the number of `1`'s in `total_count` independent trials, with each trial having the same probability of `1`, i.e., `probs`.

The probability mass function (pmf) is,

```none pmf(k; n, p) = p**k (1 - p)**(n - k) / Z Z = k! (n - k)! / n! ```

where: * `total_count = n`, * `probs = p`, * `Z` is the normalizing constant, and, * `n!` is the factorial of `n`.

#### Examples

Create a single distribution, corresponding to 5 coin flips. Create a single distribution (using logits), corresponding to 5 coin flips. Creates 3 distributions with the third distribution most likely to have successes. The distribution functions can be evaluated on counts.
Show Example
dist = Binomial(total_count=5., probs=.5) 

Properties

Public properties

object allow_nan_stats get;

object allow_nan_stats_dyn get;

TensorShape batch_shape get;

object batch_shape_dyn get;

object dtype get;

object dtype_dyn get;

TensorShape event_shape get;

object event_shape_dyn get;

object logits get;

Log-odds of drawing a `1`.

object logits_dyn get;

Log-odds of drawing a `1`.

string name get;

object name_dyn get;

IDictionary<object, object> parameters get;

object parameters_dyn get;

Tensor probs get;

Probability of drawing a `1`.

object probs_dyn get;

Probability of drawing a `1`.

object PythonObject get;

object reparameterization_type get;

object reparameterization_type_dyn get;

object total_count get;

Number of trials.

object total_count_dyn get;

Number of trials.

object validate_args get;

object validate_args_dyn get;