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.
The function returns a numeric value equalling the Um_factor.
Arguments
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.