affinity_matrix: Generate a symmetric affinity matrix based on a distance...

Description Usage Arguments Value Examples

Description

Generate a symmetric affinity matrix based on a distance matrix using 'local' Gaussian kernel

Usage

1
affinity_matrix(D, k, alpha = 1/6, beta = 1/6)

Arguments

D

distance matrix (need to be a square and non-negative matrix)

k

the number of k-nearest neighbors

alpha

coefficient for local diameters. Default value: 1/6. This default value should work for most cases.

beta

coefficient for pair-wise distance. Default value: 1/6. This default value should work for most cases.

Value

an affinity matrix

Examples

1
2
D = matrix(runif(400), nrow=20)
A = affinity_matrix(D, 5)

BeautyOfWeb/ANF documentation built on May 28, 2019, 11:57 a.m.