用法
covariance(
name='covariance'
)參數
-
namePythonstr附加在此函數創建的操作名稱之前。
返回
-
covariance具有形狀[B1, ..., Bn, k', k']的浮點Tensor其中第一個n維度是批坐標和k' = reduce_prod(self.event_shape)。
協方差。
協方差(可能)僅針對非標量事件分布定義。
例如,對於長度 - k 、 vector-valued 分布,計算如下:
Cov[i, j] = Covariance(X_i, X_j) = E[(X_i - E[X_i]) (X_j - E[X_j])]
其中 Cov 是(一批)k x k 矩陣,0 <= (i, j) < k 和 E 表示期望。
或者,對於非向量、多變量分布(例如,matrix-valued、Wishart),Covariance 應在事件的一些向量化下返回一個(一批)矩陣,即,
Cov[i, j] = Covariance(Vec(X)_i, Vec(X)_j) = [as above]
其中 Cov 是 (batch of) k' x k' 矩陣, 0 <= (i, j) < k' = reduce_prod(event_shape) 和 Vec 是此分布的事件維度的一些函數映射索引到長度索引 - k' 向量。
相關用法
- Python tf.compat.v1.distributions.Bernoulli.cross_entropy用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.cdf用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.kl_divergence用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.log_survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.log_cdf用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.stddev用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.quantile用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.variance用法及代碼示例
- Python tf.compat.v1.distributions.Beta.quantile用法及代碼示例
- Python tf.compat.v1.distributions.Beta.kl_divergence用法及代碼示例
- Python tf.compat.v1.distributions.Beta.log_cdf用法及代碼示例
- Python tf.compat.v1.distributions.Beta.covariance用法及代碼示例
- Python tf.compat.v1.distributions.Beta.cdf用法及代碼示例
- Python tf.compat.v1.distributions.Beta.log_survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Beta用法及代碼示例
- Python tf.compat.v1.distributions.Beta.stddev用法及代碼示例
- Python tf.compat.v1.distributions.Beta.cross_entropy用法及代碼示例
- Python tf.compat.v1.distributions.Beta.survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Beta.variance用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.compat.v1.distributions.Bernoulli.covariance。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
