skbio.stats.ordination.mean_and_std¶
- skbio.stats.ordination.mean_and_std(a, axis=None, weights=None, with_mean=True, with_std=True, ddof=0)[源代码]¶
计算加权平均值和标准差
状态:自0.4.0起处于实验状态。指定的轴。
- 参数:
a (array_like) -- 计算这些值的平均值和标准差。
axis (int, optional) -- 沿其计算统计信息的轴。默认情况下,在展平的数组上计算它们。
weights (array_like, optional) -- 中的值关联的权重数组 a 。中的每个值 a 根据其关联的权重贡献平均值。权重数组可以是一维的(在这种情况下,其长度必须是 a 沿给定轴)或形状与 a 。如果 weights=None ,则中的所有数据 a 假设它们的重量等于1。
with_mean (bool, optional, defaults to True) -- 如果为True,则计算平均值。
with_std (bool, optional, defaults to True) -- 如果为True,则计算标准差。
ddof (int, optional, defaults to 0) -- 它的意思是增量自由度。方差的计算方法是除以 n - ddof (其中 n 是元素的数量)。默认情况下,它计算最大似然估计器。
- 返回:
返回沿指定轴的平均偏差和标准偏差。如果其中任何一个不是必需的,则返回 None 取而代之的是
- 返回类型:
average, std