Standard deviation. Standard deviation is defined as, ```none stddev = E[(X - E[X])**2]**0.5 ``` where `X` is the random variable associated with this distribution, `E` denotes expectation, and `stddev.shape = batch_shape + event_shape`. Args: name: Python `str`
(self, name="stddev")
| 1059 | type(self).__name__)) |
| 1060 | |
| 1061 | def stddev(self, name="stddev"): |
| 1062 | """Standard deviation. |
| 1063 | |
| 1064 | Standard deviation is defined as, |
| 1065 | |
| 1066 | ```none |
| 1067 | stddev = E[(X - E[X])**2]**0.5 |
| 1068 | ``` |
| 1069 | |
| 1070 | where `X` is the random variable associated with this distribution, `E` |
| 1071 | denotes expectation, and `stddev.shape = batch_shape + event_shape`. |
| 1072 | |
| 1073 | Args: |
| 1074 | name: Python `str` prepended to names of ops created by this function. |
| 1075 | |
| 1076 | Returns: |
| 1077 | stddev: Floating-point `Tensor` with shape identical to |
| 1078 | `batch_shape + event_shape`, i.e., the same shape as `self.mean()`. |
| 1079 | """ |
| 1080 | |
| 1081 | with self._name_scope(name): |
| 1082 | try: |
| 1083 | return self._stddev() |
| 1084 | except NotImplementedError as original_exception: |
| 1085 | try: |
| 1086 | return math_ops.sqrt(self._variance()) |
| 1087 | except NotImplementedError: |
| 1088 | raise original_exception |
| 1089 | |
| 1090 | def _covariance(self): |
| 1091 | raise NotImplementedError("covariance is not implemented: {}".format( |