本文簡要介紹 python 語言中 scipy.stats.mstats.mode
的用法。
用法:
scipy.stats.mstats.mode(a, axis=0)#
返回傳遞數組中模態(最常見)值的數組。
- a: array_like
要查找其模式的 n 維數組。
- axis: int 或無,可選
操作的軸。默認值為 0。如果沒有,則計算整個數組 a。
- mode: ndarray
模態值數組。
- count: ndarray
每種模式的計數數組。
參數 ::
返回 ::
注意:
有關詳細信息,請參閱
scipy.stats.mode
。例子:
>>> import numpy as np >>> from scipy import stats >>> from scipy.stats import mstats >>> m_arr = np.ma.array([1, 1, 0, 0, 0, 0], mask=[0, 0, 1, 1, 1, 0]) >>> mstats.mode(m_arr) # note that most zeros are masked ModeResult(mode=array([1.]), count=array([2.]))
相關用法
- Python SciPy mstats.mquantiles用法及代碼示例
- Python SciPy mstats.trim用法及代碼示例
- Python SciPy mstats.winsorize用法及代碼示例
- Python SciPy mstats.argstoarray用法及代碼示例
- Python SciPy mstats.trima用法及代碼示例
- Python SciPy mstats.tmin用法及代碼示例
- Python SciPy mstats.tmax用法及代碼示例
- Python SciPy mstats.kruskalwallis用法及代碼示例
- Python SciPy mstats.sem用法及代碼示例
- Python SciPy mstats.zscore用法及代碼示例
- Python SciPy mstats.zmap用法及代碼示例
- Python SciPy mstats.hmean用法及代碼示例
- Python SciPy mstats.variation用法及代碼示例
- Python SciPy mstats.compare_medians_ms用法及代碼示例
- Python SciPy mstats.gmean用法及代碼示例
- Python SciPy mstats.pearsonr用法及代碼示例
- Python SciPy mstats.kruskal用法及代碼示例
- Python SciPy mstats.tmean用法及代碼示例
- Python SciPy mstats.count_tied_groups用法及代碼示例
- Python SciPy mstats.chisquare用法及代碼示例
- Python SciPy mstats.describe用法及代碼示例
- Python SciPy mstats.sen_seasonal_slopes用法及代碼示例
- Python SciPy mstats.find_repeats用法及代碼示例
- Python SciPy matlab.loadmat用法及代碼示例
- Python SciPy misc.ascent用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.stats.mstats.mode。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。