similarity_coef: Similarity Coefficient

View source: R/similarity_coef.R

similarity_coefR Documentation

Similarity Coefficient

Description

Calculates the similarity coeficient between observations based on their features (columns). Coefficient ranges between 0 and 1, with values close to 1 indicating more similarity.

Usage

similarity_coef(x, samp.names = NULL, digits = 3)

Arguments

x

A data frame of observations in rows and features (variables) in columns. Features must be non-zero and positive.

samp.names

A character vector with the names of the observations (samples)

digits

Number of digits to use

Value

A matrix of similarity coefficients

References

Borchardt, G.A. (1974). The SIMAN Coefficient for Similarity Analysis. Classification Society Bulletin, 3(2), 2–8.

Examples

dat = iris[c(1,2,51,52,101,102),]
similarity_coef(dat)


maxgav13/GMisc documentation built on June 12, 2022, 3:48 a.m.