当前位置: 首页>>代码示例>>Python>>正文


Python stats.median_absolute_deviation方法代码示例

本文整理汇总了Python中scipy.stats.median_absolute_deviation方法的典型用法代码示例。如果您正苦于以下问题:Python stats.median_absolute_deviation方法的具体用法?Python stats.median_absolute_deviation怎么用?Python stats.median_absolute_deviation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在scipy.stats的用法示例。


在下文中一共展示了stats.median_absolute_deviation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: all_features

# 需要导入模块: from scipy import stats [as 别名]
# 或者: from scipy.stats import median_absolute_deviation [as 别名]
def all_features():
    """ Returns dictionary of all features in the module

    .. note:: Some of the features (hist4, corr) are relatively expensive to compute
    """
    features = {'mean': mean,
                'median': median,
                'gmean': gmean,
                'hmean': hmean,
                'vec_sum': vec_sum,
                'abs_sum': abs_sum,
                'abs_energy': abs_energy,
                'std': std,
                'var': var,
                'mad': median_absolute_deviation,
                'variation': variation,
                'min': minimum,
                'max': maximum,
                'skew': skew,
                'kurt': kurt,
                'mean_diff': mean_diff,
                'mean_abs_diff': means_abs_diff,
                'mse': mse,
                'mnx': mean_crossings,
                'hist4': hist(),
                'corr': corr2,
                'mean_abs_value': mean_abs,
                'zero_crossings': zero_crossing(),
                'slope_sign_changes': slope_sign_changes(),
                'waveform_length': waveform_length,
                'emg_var': emg_var,
                'root_mean_square': root_mean_square,
                'willison_amplitude': willison_amplitude()}
    return features 
开发者ID:dmbee,项目名称:seglearn,代码行数:36,代码来源:feature_functions.py

示例2: mad_wavelet

# 需要导入模块: from scipy import stats [as 别名]
# 或者: from scipy.stats import median_absolute_deviation [as 别名]
def mad_wavelet(image):
    """ image: Median absolute deviation of the first wavelet scale.
    (WARNING: sorry to disapoint, this is not a wavelet for mad scientists)

    Parameters
    ----------
    image: array
        An image or cube of images
    Returns
    -------
    mad: array
        median absolute deviation for each image in the cube
    """
    sigma = mad(Starlet(image, lvl = 2).coefficients[:,0,...], axis = (-2,-1))
    return sigma 
开发者ID:pmelchior,项目名称:scarlet,代码行数:17,代码来源:wavelet.py

示例3: median_absolute_deviation

# 需要导入模块: from scipy import stats [as 别名]
# 或者: from scipy.stats import median_absolute_deviation [as 别名]
def median_absolute_deviation(X):
    """ median absolute deviation for each variable in a segmented time series """
    return stats.median_absolute_deviation(X, axis=1) 
开发者ID:dmbee,项目名称:seglearn,代码行数:5,代码来源:feature_functions.py

示例4: test_mad

# 需要导入模块: from scipy import stats [as 别名]
# 或者: from scipy.stats import median_absolute_deviation [as 别名]
def test_mad():
    from scipy.stats import median_absolute_deviation
    x = np.arange(50)
    assert np.isclose(util.mad(x), median_absolute_deviation(x, scale=1)) 
开发者ID:mirnylab,项目名称:cooler,代码行数:6,代码来源:test_util.py


注:本文中的scipy.stats.median_absolute_deviation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。