fuse {analogue} | R Documentation |

## Fused dissimilarities

### Description

Combines dissimilarities from two or more dissimilarity objects into a single dissimilarity object so that both original dissimilarities contribute equally. Weighted combinations of the original objects can also be created.

### Usage

```
fuse(..., weights = NULL)
## S3 method for class 'matrix'
fuse(..., weights = NULL)
## S3 method for class 'dist'
fuse(..., weights = NULL)
```

### Arguments

`...` |
objects to fuse. Methods currently exist for objects of
class |

`weights` |
numeric; vector of weights that sum to 1, one weight
for each object supplied in |

### Details

Fuses, or combines, dissimilarity objects in a very flexible way to create a single dissimilarity object that incorporates the separate dissimilarities. In analogue matching, we may wish to combine information from two or more proxies, such as diatoms and cladocera, or from biological and chemical or physical data in the case of matching modern samples.

The function can also be used to fuse dissimilarity objects created from a single data set but using different dissimilarity coefficients. In this way one could create a new dissimilarity object combining dissimilarity based on abundance data and presence absence data into a single measure.

`fuse`

uses the method of Melssen et al. (2006) to combine
dissimilarities. The dissimilarities in each dissimilarity object are
scaled so that the maximum dissimilarity in each object is 1. The
scaled dissimilarity objects are then weighted according to the
supplied weights. If no weights are supplied (the default) the
dissimilarity objects are weighted equally; ```
weights = rep(1/N,
N)
```

, where `N`

is the number of dissimilarity objects fused.

`D_{fused}(j, k) = \sum_{i = 1}^N w_i D_{ijk}`

where `D_{fused}(j, k)`

is the fused dissimilarity
between samples `j`

and `k`

, `w_i`

is the weight
assigned to the `i`

th dissimilarity object and
`D_{ijk}`

is the dissimilarity between `j`

and
`k`

for the `i`

th dissimilarity object.

### Value

`fuse`

returns an object of class `"dist"`

with the
attribute `"method"`

set to `"fuse"`

.

This is the case even if the supplied objects are full dissimilarity
matrices. If you want a full dissimilarity object, use
`as.matrix.dist`

on the returned object.

The returned object contains an extra attribute `"weights"`

,
which records the weights used in the fusing.

### Author(s)

Gavin L. Simpson

### References

Melssen W., Wehrens R. and Buydens L. (2006) Supervised Kohonen
networks for classification problems. *Chemometrics and
intelligent laboratory systems* **83**, 99–113.

### See Also

### Examples

```
train1 <- data.frame(matrix(abs(runif(100)), ncol = 10))
train2 <- data.frame(matrix(sample(c(0,1), 100, replace = TRUE),
ncol = 10))
rownames(train1) <- rownames(train2) <- LETTERS[1:10]
colnames(train1) <- colnames(train2) <- as.character(1:10)
d1 <- vegdist(train1, method = "bray")
d2 <- vegdist(train2, method = "jaccard")
dd <- fuse(d1, d2, weights = c(0.6, 0.4))
dd
str(dd)
```

*analogue*version 0.17-6 Index]