Remove boxplot identified outliers from data

5 ビュー (過去 30 日間)
CB
CB 2022 年 5 月 9 日
コメント済み: Jonas 2022 年 5 月 13 日
Hi all,
I would wish to remove outliers from data available in a table that presents a wear parameter progression that allegedly depends on the wheel diameter range so that I can use data identified as non-outlier at a later stage. My query is not related to how to remove data outliers from boxplot output, but to be able to remove these from my data.
To date I managed to remove the outliers for the whole range of data (i.e., wheel diameter wear progression from 920 to 845mm), that is to account for the whole wear diameter range using rmoutliers, however this does not seem to account for outliers that are considered in smaller diameter ranges (i.e., 5mm) as it is my intention.
To be more specific I have used the following code, which might not be perfect, but seems to work, to identify outliers in the wear parameter under assessment across all wheel diameter range:
%Remove outliers from data.
[B,TF] = rmoutliers(y,'quartiles');
J = [x, y, TF];
V2 = array2table(J);
V3 = V2((V2.J3 <= 0),:);
xx = V3.J1;
yy = V3.J2;
V4 = V2((V2.J3 >= 1),:);
xxout = V4.J1;
yyout = V4.J2;
Then I have plotted this data vs wheel diameter range of 5 mm withing the wear range limits [920 to 845mm], but as I have considered the whole range of wear there are still outliers being identified.
Boxplot without outliers removed:
Boxplot with outliers removed for the whole wheel range (noted that still some outliers are being captured).
All in all, what I want is to remove outliers using the same approach, but considering data packs contained in 5 mm range (or n range as required) data sets as the boxplot function does, but with these being removed from my data so that I can assess.
Below an example of the data that I am looking to work out in such manner (wear parameter, diameter range min - diameter range max):
Any help would be very much appreciated.
Kind regards,
CB
  5 件のコメント
Jonas
Jonas 2022 年 5 月 13 日
great, have a nice day!

サインインしてコメントする。

回答 (0 件)

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by