skbio.stats.composition.clr_inv¶
- skbio.stats.composition.clr_inv(mat)[源代码]¶
执行反中心对数比变换。
状态:从0.4.0开始实验。
此函数将组合从真实空间转换为Aitchison几何体。这个 \(clr^{-1}\) 变换既是等距变换,又是定义在下列空间上的同构变换
\(clr^{-1}: U \rightarrow S^D\)
where \(U= \{x :\sum\limits_{i=1}^D x = 0 \; \forall x \in \mathbb{R}^D\}\)
此转换的定义如下
\[clr^{-1}(x) = C[\exp( x_1, \ldots, x_D)]\]- 参数:
mat (array_like, float) -- 实值矩阵,其中行=转换后的成分,列=分量
- 返回:
逆CLR变换矩阵
- 返回类型:
示例
>>> import numpy as np >>> from skbio.stats.composition import clr_inv >>> x = np.array([.1, .3, .4, .2]) >>> clr_inv(x) array([ 0.21383822, 0.26118259, 0.28865141, 0.23632778])