Learn R Programming

fdakma (version 1.2.1)

fdakma-package: Functional Data Analysis: K-Mean Alignment

Description

fdakma jointly performs clustering and alignment of a functional dataset (multidimensional or unidimensional functions).

Arguments

Details

Package:
fdakma
Type:
Package
Version:
1.2
Date:
2015-03-12
License:
GPL-3

References

Sangalli, L.M., Secchi, P., Vantini, S., Vitelli, V., 2010. "K-mean alignment for curve clustering". Computational Statistics and Data Analysis, 54, 1219-1233.

Sangalli, L.M., Secchi, P., Vantini, S., 2014. "Analysis of AneuRisk65 data: K-mean Alignment". Electronic Journal of Statistics, Special Section on "Statistics of Time Warpings and Phase Variations", Vol. 8, No. 2, 1891-1904.

See Also

kma.compare, kma.similarity, kma.data, kma, kma.show.results

Examples

Run this code
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

## Not run: 
# # Plot of original functions
# matplot(t(x),t(y0), type='l', xlab='x', ylab='orig.func')
# title ('Original functions')
# 
# # Plot of original function first derivatives
# matplot(t(x),t(y1), type='l', xlab='x', ylab='orig.deriv')
# title ('Original function first derivatives')
# 
# 
# # Example: result of kma function with 2 clusters, 
# # allowing affine transformation for the abscissas
# # and considering 'd1.pearson' as similarity.method.
# fdakma_example <- 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)
# )
# 
# kma.show.results(fdakma_example)
# 
# names(fdakma_example)
# 
# # Labels assigned to each function
# fdakma_example$labels
# 
# # Total shifts and dilations applied to the original 
# # abscissa to obtain the aligned abscissa
# fdakma_example$shift
# fdakma_example$dilation
# ## End(Not run)

Run the code above in your browser using DataLab