createDistMatrix {ddc}R Documentation

Create the dataframe of the Dissimilarity matrix

Description

Use the DTW to generate the matrix

Usage

createDistMatrix(standard_matrix, output_dir = NULL, mc.cores = 1, ...)

Arguments

standard_matrix

the matrix genereated by function 'createStandardMatrix'

output_dir

the file to save the dissimilarity matrix data

mc.cores

the number of cores would be used in parallel

...

the same parameters which would be used in 'dtw' for calculating the distances of events

Value

the matrix, which describes pairwise distinction between M objects. It is a square symmetrical 'MxM' matrix with the (ij)th element equal to the value of a chosen measure of distinction between the (i)th and the (j)th object.

Examples


original_data <- data.frame("1"=c(1, 2, 1), "2"=c(5,6,7), 
   "3"=c(4, 5, 8), "4"=c(3, 1, 9))
standard_matrix <- createStandardMatrix(data = original_data)
dist_matrix <- createDistMatrix(standard_matrix = standard_matrix)


[Package ddc version 1.0.1 Index]