當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。