Um_factor | R Documentation |
The function calculates the Um factor associated with an ordering of the rows and columns of a distance matrix. Lower values indicate a better grouping of similar objects. This was the original objective function proposed in the MaCzek program for producing Czekanowski's Diagram.
Um_factor( distMatrix, order = NULL, matrix_conversion_coefficient = 1, inverse_um = TRUE )
distMatrix |
a 'dist' object, matrix of distances between observations. |
order |
a vector, if NULL, then the value of the factor is calculate for the distance matrix as is, otherwise the rows and columns are reordered according to the vector order. |
matrix_conversion_coefficient |
numeric, value to be added to the distances, so that a division by 0 error is not thrown. |
inverse_um |
logical, if TRUE, then the negative is returned. Default TRUE as the function is called in the genetic algorithm maximization procedures. |
The function returns a numeric value equalling the Um_factor.
# Set data #### x<-mtcars mD<-stats::dist(scale(x)) mCz<-czek_matrix(x) Um_factor(mD) Um_factor(mD,order=attr(mCz,"order"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.