MATLAB-箱ひげ図と箱ひげ図IQR分析



Matlab Box Plot Box Plot Iqr Analysis



boxplot(X、notch、 ‘sym’、vert、whis)
notch = 1-凹型箱ひげ図を生成、notch = 0-箱ひげ図を生成
sym-グラフィックのシンボル。デフォルトは「+」です。
vret = 1-垂直箱ひげ図、vert = 0-水平箱ひげ図
whisは「whisker」図形の長さです。デフォルトは1.5、whis = 0、sym記号を使用して表示します。
ボックスの外側のデータを表示します。
注意 :箱ひげ図関数は、行列の1つの列を分析の1つの次元として使用するため、高次元のデータ分析に非常に適しています。

% Example a=[2 3 4 5 6]'b=[10 11 100 13 14]'c=[19 200 22 24 26]' d=[a b c] boxplot(d,0,'*',1,0) % The graphics drawn directly are not beautiful, it is best to beautify

画像



箱ひげ図IQR分析

IQR分析
シーケンスデータを昇順で並べます
1/4は下位分位値Q1、3 / 4は上位分位値Q2です
四分位範囲:IQR = Q2-Q1
IQR基準の下での外れ値の検出間隔は[Q1-1.5 IQR、Q2 + 1.5 IQR]
この範囲外は外れ値として記録されます

%all_year is the data Q1 is the upper quartile of each indicator Q2 is the lower quartile of each indicator IQR is the interquartile range all_year=[BE_PS,CCR,CR_PS,NAV_PS,NCF_PS,NP_GR,NPR,OEBT,OI_PS,OP_GR,OR_GR,R_OA] % Remove the last row of data, the last row of data is useless for this case all_year(2,:)=[] boxplot(all_year,0,'+',1,0) %prctile function to find quantile Q1=prctile(all_year,25)Q2=prctile(all_year,75) IQR=Q2-Q1% interquartile range %Look outside the detection range The %find function gives a single index num=find(all_yearQ2+1.5.*IQR) year(num)

私はまだMATLABの初心者であり、理解または記述の過程でエラーが発生する可能性があります。みんなが私を指摘して一緒に成長してくれることを願っています。