Curve fitting WITHOUT toolbox and removing outliers from data.

조회 수: 17 (최근 30일)
Jack Williams
Jack Williams 2019년 8월 28일
댓글: Steven Lord 2019년 8월 28일
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

답변 (1개)

John D'Errico
John D'Errico 2019년 8월 28일
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
Jack Williams
Jack Williams 2019년 8월 28일
Sorry what is meant by choosing a model?
Steven Lord
Steven Lord 2019년 8월 28일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by