rmse | R Documentation |
This function calculates the root mean square (RMSE) and landmark distances for a specimen (a landmark matrix/array) to a reference specimen (e.g., a mean shape or a manually landmarked specimen)
rmse(M1, M2)
M1 |
A matrix or 2d array storing landmark coordinates of a specimen |
M2 |
A matrix or 2d array storing landmark coordinates of a reference specimen |
A list that contains the RMSE of the specimen as well as pairwise landmark distances
between the specimen and the reference
The returned value contains:
$LM_distances = all pairwise landmark distances between a specimen and a reference
$RMSE = the RMSE value between a specimen and a reference
create two 3D LM coordinates: x=NULL for (i in 1:5) x=rbind(x, c(0,0,i)) x [,1] [,2] [,3] [1,] 0 0 1 [2,] 0 0 2 [3,] 0 0 3 [4,] 0 0 4 [5,] 0 0 5 y=NULL for (i in 5:1) y=rbind(y, c(0,0,i)) rmse(x,y) $LM_distances [1] 4 2 0 2 4 $RMSE [1] 2.828427
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.