借助statsmodels.medcouple()
方法,我們可以計算出偏斜的medcouple魯棒度量。
用法:statsmodels.medcouple(array, axis)
返回:Return the medcouple statistic value.
範例1:
在這個例子中,我們可以通過使用statsmodels.medcouple()
方法,我們可以使用此方法獲得medcouple統計值。
# import numpy and statsmodels
import numpy as np
from statsmodels.stats.stattools import medcouple
g = np.array([1, 2, 3, 4, 7, 8])
# Using statsmodels.medcouple() method
gfg = medcouple(g)
print(gfg)
輸出:
0.2857142857142857
範例2:
# import numpy and statsmodels
import numpy as np
from statsmodels.stats.stattools import medcouple
g = np.array([1, 2, 8, 9, 10])
# Using statsmodels.medcouple() method
gfg = medcouple(g)
print(gfg)
輸出:
-0.5555555555555556
相關用法
注:本文由純淨天空篩選整理自Jitender_1998大神的英文原創作品 statsmodels.medcouple() in Python。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。