Hi,
I know the Cloudcompare uses the RMS difference (error) to align two objects. If my objects are already aligned by other software, can Cloudcompare calculate the "Root mean square" or "Root mean square error" for two different objects (one is for reference and the other one needs compared)?
Thank you very much.
Root mean square and root mean square error
Re: Root mean square and root mean square error
There's no way of computing the 'RMS' exactly. But you can compute the standard deviation of the Normal distribution of the scalar field (with Edit > Scalar Fields > Compute stat. params'), it's somehow related to the RMS.
And you can even get exactly the RMS by mixing the standard deviation and the mean values, as :
std. dev. = square_root( sum_of_squared_errors / number_of_values - mean * mean)
and
RMS = square_root( sum_of_squared_errors / number_of_values)
which implies that :
RMS = square_root(std.dev. ^ 2 + mean * mean)
(if I'm not mistaken :D)
And you can even get exactly the RMS by mixing the standard deviation and the mean values, as :
std. dev. = square_root( sum_of_squared_errors / number_of_values - mean * mean)
and
RMS = square_root( sum_of_squared_errors / number_of_values)
which implies that :
RMS = square_root(std.dev. ^ 2 + mean * mean)
(if I'm not mistaken :D)
Daniel, CloudCompare admin
Re: Root mean square and root mean square error
Thank you for the reply.
When I do C2C comparison for my models, I will get the mean and the standard deviation. Do you mean I can directly calculate the root mean square error based on the mean and the standard deviation that I got in the console? Or, I have to use the way that you mentioned: (with Edit > Scalar Fields > Compute stat. params') to get the standard deviation and the mean.
Thanks again.
When I do C2C comparison for my models, I will get the mean and the standard deviation. Do you mean I can directly calculate the root mean square error based on the mean and the standard deviation that I got in the console? Or, I have to use the way that you mentioned: (with Edit > Scalar Fields > Compute stat. params') to get the standard deviation and the mean.
Thanks again.
Re: Root mean square and root mean square error
It should be the same values indeed. But you'd better validate this once, just in case ;)
Daniel, CloudCompare admin
Re: Root mean square and root mean square error
Root Mean Squared Error using Python sklearn Library
Mean Squared Error ( MSE ) is defined as Mean or Average of the square of the difference between actual and estimated values. This means that MSE is calculated by the square of the difference between the predicted and actual target variables, divided by the number of data points. It is always non–negative values and close to zero are better.
Root Mean Squared Error is the square root of Mean Squared Error (MSE). This is the same as Mean Squared Error (MSE) but the root of the value is considered while determining the accuracy of the model.
import numpy as np
import sklearn.metrics as metrics
actual = np.array([56,45,68,49,26,40,52,38,30,48])
predicted = np.array([58,42,65,47,29,46,50,33,31,47])
mse_sk = metrics.mean_squared_error(actual, predicted)
rmse_sk = np.sqrt(mse)
print("Root Mean Square Error :", rmse_sk)
Mean Squared Error ( MSE ) is defined as Mean or Average of the square of the difference between actual and estimated values. This means that MSE is calculated by the square of the difference between the predicted and actual target variables, divided by the number of data points. It is always non–negative values and close to zero are better.
Root Mean Squared Error is the square root of Mean Squared Error (MSE). This is the same as Mean Squared Error (MSE) but the root of the value is considered while determining the accuracy of the model.
import numpy as np
import sklearn.metrics as metrics
actual = np.array([56,45,68,49,26,40,52,38,30,48])
predicted = np.array([58,42,65,47,29,46,50,33,31,47])
mse_sk = metrics.mean_squared_error(actual, predicted)
rmse_sk = np.sqrt(mse)
print("Root Mean Square Error :", rmse_sk)