How to remove outliers before prediction

6 visualizaciones (últimos 30 días)
Mekala balaji
Mekala balaji el 26 de Feb. de 2015
Comentada: Mekala balaji el 28 de Feb. de 2015
Dears, I want to predict current End value based current Start values using previous historical data as I have shown below. I am using the below mention code, but I want to remove outlier if the start (or end) value >=0.28 (or if you have some better idea like if R2 is <0.9, and to make it 0.98 or more by removing suitable outliers). Please suggest me how can I remove outlier(s).
data = [0.25 0.256
0.24 0.24
0.29 0.33
0.224 0.24
0.26 0.27
0.24 0.26
0.26 0.31
0.29 0.34];
clc;
clear all;
scatter(data(:, 1), data(:, 2));
polystartend = polyfit(data(:,1), data(:, 2), 1);
todaystart = 21;
todayend = polyval(polystartend, todaystart)
Many many thanks in advance,

Respuestas (1)

the cyclist
the cyclist el 26 de Feb. de 2015
Editada: the cyclist el 26 de Feb. de 2015
Here is a technical way to remove the outliers based on your suggestion:
removeIdx = any(data >= 0.28,2);
data(removeIdx,:) = [];
The identification of outliers is a rich and complex subject. Iglewicz and Hoaglin have written a 90-page book on the subject.
  8 comentarios
Image Analyst
Image Analyst el 28 de Feb. de 2015
Maybe...
R = corrcoef(data(:,1), data(:,2))
R2 = R(1,2)^2
Mekala balaji
Mekala balaji el 28 de Feb. de 2015
Thank you sir,

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by