data(kma.data)
x <- kma.data$x # abscissas
y0 <- kma.data$y0 # evaluations of original functions
y1 <- kma.data$y1 # evaluations of original function first derivatives
# kma function with 2 clusters, allowing affine
# transformation for the abscissas and considering
# 'd1.pearson' as similarity.method.
kma.show.results_example1 <- kma (
x=x, y0=y0, y1=y1, n.clust = 2,
warping.method = 'affine',
similarity.method = 'd1.pearson',
center.method = 'k-means',
seeds = c(1,21)
)
# Example: kma.show.results shows the results of kma function
kma.show.results(kma.show.results_example1)
# Example using outputs of kma.compare function
# Results of kma function with 3 different
# numbers of clusters (1,2,3) combined with four alignment
# methods ('NOalignment' by default, 'shift', 'dilation',
# 'affine') and considering 'd1.pearson' as similarity.method.
kma.show.results_example2 <- kma.compare (
x=x, y0=y0, y1=y1, n.clust = 1:3,
warping.method = c('affine'),
similarity.method = 'd1.pearson',
center.method = 'k-means',
seeds = c(1,21,30),
plot.graph=1)
names (kma.show.results_example2)
# To see results for kma function with n.clust=2
# and warping.method='affine'.
kma.show.results (kma.show.results_example2$Result.affine[[2]])
# Labels assigned to each function for the
# kma function with n.clust=2 and warping.method='affine'.
kma.show.results_example2$Result.affine[[2]]$labelsRun the code above in your browser using DataLab