MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / stddev

Method stddev

tensorflow/python/ops/distributions/distribution.py:1061–1088  ·  view source on GitHub ↗

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")

Source from the content-addressed store, hash-verified

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(

Callers 15

testStddevMethod · 0.80
testStddevMethod · 0.80
testDtypeMethod · 0.80
testStddevMethod · 0.80

Calls 3

_name_scopeMethod · 0.95
_stddevMethod · 0.95
_varianceMethod · 0.95

Tested by 15

testStddevMethod · 0.64
testStddevMethod · 0.64
testDtypeMethod · 0.64
testStddevMethod · 0.64