Is the meanError returned by pcfitplane() "mean error" or "mean square error"?

1 回表示 (過去 30 日間)
TeMei Wang
TeMei Wang 2020 年 5 月 26 日
回答済み: Daniel Huber 2022 年 2 月 4 日
On the help page of pcfitplane(), the returned meanError is explained as "mean square error (MSE)". In my test, the returned meanError is 0.0042. If it is MSE, the RMSE (root mean square error) is 0.065 (meters). This is unreasonable because the maxDistance is set to 0.05 (meters). The RMSE shouldn't be larger than the maxDistance (the max distance from an inlier point to the plane). If the returned meanError is interpreted as "mean error" (0.0042 meters), it seems to be more consistent to the plot. My code and data are attached for reference.

回答 (2 件)

Monisha Nalluru
Monisha Nalluru 2020 年 7 月 10 日
It’s true that the documentation of pcfitplane clearly states that the function returns mean error as one of output argument.
But from BestFitPlane.m, it looks like you are trying to calculate the root mean squared error from mean error by applying square root operation. This may not be a proper way to calculate root mean squared error.
You can refer to this link for information on root mean squared error
You can refer to this link for more information on mean error or mean standard error
  1 件のコメント
TeMei Wang
TeMei Wang 2020 年 10 月 11 日
Thanks a lot for answering my question and providing useful links.
The webpage of 2nd link (mean error definition) states that "The mean error is an informal term ..." and "The mean error usually results in a number that isn’t helpful because positives and negatives cancel each other out." Is it possible to let pcfitplane() return more useful error term, such as "mean absolute error (MAE)" or "mean square error (MSE)" instead?
In the webpage of pcfitplane, the text in "Output Arguments" section is "meanError — Mean square error" which is inconsistent to the text in "Description" section: "[___, meanError] = pcfitplane(ptCloudIn, maxDistance) additionally returns the mean error of the distance of inlier points to the model". I would like to suggest rewriting the text and making them consistent.
The reason to apply square root operation in BestFitPlane.m is to test if the output "meanError" is "mean square error (MSE)" or not. The test result shows that "meanError" is not MSE.

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


Daniel Huber
Daniel Huber 2022 年 2 月 4 日
Looking at the implementation, it looks like what is returned is the mean absolute error.
Here we see that it is a mean (and not mean squared or RMS):
meanError = mean(distances(distances < ransacParams.maxDistance));
In the evalPlane function, we can see that distance (dis) is the absolute distance (not signed):
dis = abs(points * model(1:3)' + model(4));

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by