sim.eucscale {netDx} | R Documentation

## Similarity method. Euclidean distance followed by exponential scaling

### Description

Computes Euclidean distance between patients. A scaled exponential similarity kernel is used to determine edge weight. The exponential scaling considers the K nearest neighbours, so that similarities between non-neighbours is set to zero. Alpha is a hyperparameterthat determines decay rate of the exponential. For details, see Wang et al. (2014). Nature Methods 11:333.

### Usage

    sim.eucscale(dat, K = 20, alpha = 0.5)

### Arguments

`dat` | (data.frame) Patient data; rows are measures, columns are patients.
`K` | (integer) Number of nearest neighbours to consider (K of KNN)
`alpha` | (numeric) Scaling factor for exponential similarity kernel. Recommended range between 0.3 and 0.8.

### Value

symmetric matrix of size ncol(dat) (number of patients) containing pairwise patient similarities

### Examples

    data(xpr)
    sim <- sim.eucscale(xpr)

[Package netDx version 1.0.3 Index]