Learn R Programming

M2SMF (version 2.0)

affinityMatrix: To calculate the similarity matrix

Description

calculate the affinity matrix from the diff matrix with 20 neighbors

Usage

affinityMatrix(Diff, K = 20, sigma = 0.5)

Arguments

Diff

A diff matrix

K

The number of neighbors in consideration

sigma

A parameter to determine the scale

Value

W The similarity matrix

Examples

Run this code
# NOT RUN {
data_list <- simu_data_gen()
Diff <- dist2eu(Standard_Normalization(data_list[[1]]),Standard_Normalization(data_list[[1]]))
simi <- affinityMatrix(Diff,20,0.5)
# }

Run the code above in your browser using DataLab