Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dissimilarity.object

Dissimilarity Matrix Object


Description

Objects of class "dissimilarity" representing the dissimilarity matrix of a dataset.

Value

The dissimilarity matrix is symmetric, and hence its lower triangle (column wise) is represented as a vector to save storage space. If the object, is called do, and n the number of observations, i.e., n <- attr(do, "Size"), then for i < j <= n, the dissimilarity between (row) i and j is do[n*(i-1) - i*(i-1)/2 + j-i]. The length of the vector is n*(n-1)/2, i.e., of order n^2.

"dissimilarity" objects also inherit from class dist and can use dist methods, in particular, as.matrix, such that d(i,j) from above is just as.matrix(do)[i,j].

The object has the following attributes:

Size

the number of observations in the dataset.

Metric

the metric used for calculating the dissimilarities. Possible values are "euclidean", "manhattan", "mixed" (if variables of different types were present in the dataset), and "unspecified".

Labels

optionally, contains the labels, if any, of the observations of the dataset.

NA.message

optionally, if a dissimilarity could not be computed, because of too many missing values for some observations of the dataset.

Types

when a mixed metric was used, the types for each variable as one-letter codes (as in the book, e.g. p.54):

A

Asymmetric binary

S

Symmetric binary

N

Nominal (factor)

O

Ordinal (ordered factor)

I

Interval scaled (numeric)

T

raTio to be log transformed (positive numeric)

.

GENERATION

daisy returns this class of objects. Also the functions pam, clara, fanny, agnes, and diana return a dissimilarity object, as one component of their return objects.

METHODS

The "dissimilarity" class has methods for the following generic functions: print, summary.

See Also


cluster

"Finding Groups in Data": Cluster Analysis Extended Rousseeuw et al.

v2.1.2
GPL (>= 2)
Authors
Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Peter Rousseeuw [aut] (Fortran original, <https://orcid.org/0000-0002-3807-5353>), Anja Struyf [aut] (S original), Mia Hubert [aut] (S original, <https://orcid.org/0000-0001-6398-4850>), Kurt Hornik [trl, ctb] (port to R; maintenance(1999-2000), <https://orcid.org/0000-0003-4198-9911>), Matthias Studer [ctb], Pierre Roudier [ctb], Juan Gonzalez [ctb], Kamil Kozlowski [ctb], Erich Schubert [ctb] (fastpam options for pam(), <https://orcid.org/0000-0001-9143-4880>), Keefe Murphy [ctb] (volume.ellipsoid({d >= 3}))
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.