Curve fitting WITHOUT toolbox and removing outliers from data.

14 visualizaciones (últimos 30 días)
Jack Williams
Jack Williams el 28 de Ag. de 2019
Comentada: Steven Lord el 28 de Ag. de 2019
Hi,
I have a set of data (6 x100 array) and would like some advice on the best way to fit a curve to the data.
num_l_ape.PNG
As you can see on the purple line, the data varies per each incrimental change in X value - often making reading the graph difficult.
What is the standard method of:
(a) - removing outliers from data
(b) - plotting curves of best fit to the data (with outliers removed)
Thanks for any help,
J

Respuestas (1)

John D'Errico
John D'Errico el 28 de Ag. de 2019
There is no standard method. Why not? because outliers are different things from what you have normally, and vary for each problem. They come from a different distribution than the normal noise in your data.
Here, it appears that you have a relatively large fraction of outliers, in comparison to the data. Effectively, you don't have outliers! That is just your usual noise.
You ask what is the standard method of plotting data without outliers? You find them. Then you plot only the data that was not an outlier. What else would you do?
There is an rmoutliers tool, in the stats toolbox. But if you have a LOT of outliers, and relatively few, noisy data points, then it won't be of much value.
You can use tools that are designed to work robustly. robustfit is one such tool, again in the stats toolbox. These tools are usually in the form of iteratively reweighted estimators, so they look for data points with large residual to the model you pose, and then downweight them in the next iteration.
Finally, the above comment notes that you need to choose a model. They cannot do that for you. The "curve of best fit" is a meaningless thing, UNLESS you have a model in mind.
  2 comentarios
Jack Williams
Jack Williams el 28 de Ag. de 2019
Sorry what is meant by choosing a model?
Steven Lord
Steven Lord el 28 de Ag. de 2019
There is an rmoutliers tool, in the stats toolbox.
FYI the rmoutliers function is part of MATLAB, you don't need Statistics and Machine Learning Toolbox to use it.

Iniciar sesión para comentar.

Categorías

Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by