Functional Data Analysis: K-Mean Alignment

It performs simultaneously clustering and alignment of a multidimensional or unidimensional functional dataset by means of k-mean alignment.


fdakma

R-CMD-check

The fdakma package is only a wrapper around the faster and more complete fdacluster package, which exposes the k-means alignment algorithm to the user. It is mainly kept alive because it was advertised under this name when the seminal paper was published. We strongly encourage R users to switch to using the fdacluster from now on.

Installation

You can install the development version of fdakma from GitHub with:

# install.packages("devtools")
devtools::install_github("astamm/fdakma")

Example

library(fdakma)
#> ! The fdakma package is only a wrapper around the
#> faster and more complete fdacluster package, which exposes the k-means
#> alignment algorithm to the user. It is mainly kept alive because it was
#> advertised under this name when the seminal paper was published. We strongly
#> encourage R users to switch to using the fdacluster from now on.

res <- kma(
  fdacluster::simulated30$x,
  fdacluster::simulated30$y,
  seeds = c(1, 21),
  n_clust = 2,
  center_method = "medoid",
  warping_method = "affine",
  dissimilarity_method = "pearson"
)
#> Information about the data set:
#>  - Number of observations: 30
#>  - Number of dimensions: 1
#>  - Number of points: 200
#> 
#> Information about cluster initialization:
#>  - Number of clusters: 2
#>  - Initial seeds for cluster centers:          1        21
#> 
#> Information about the methods used within the algorithm:
#>  - Warping method: affine
#>  - Center method: medoid
#>  - Dissimilarity method: pearson
#>  - Optimization method: bobyqa
#> 
#> Information about warping parameter bounds:
#>  - Warping options:    0.1500   0.1500
#> 
#> Information about convergence criteria:
#>  - Maximum number of iterations: 100
#>  - Distance relative tolerance: 0.001
#> 
#> Information about parallelization setup:
#>  - Number of threads: 1
#>  - Parallel method: 0
#> 
#> Other information:
#>  - Use fence to robustify: 0
#>  - Check total dissimilarity: 1
#>  - Compute overall center: 0
#> 
#> Running k-centroid algorithm:
#>  - Iteration #1
#>    * Size of cluster #0: 20
#>    * Size of cluster #1: 10
#>  - Iteration #2
#>    * Size of cluster #0: 20
#>    * Size of cluster #1: 10
#> 
#> Active stopping criteria:
#>  - Memberships did not change.
plot(res, type = "data")
plot(res, type = "warping")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("fdakma")

1.3.1 by Aymeric Stamm, 3 years ago


https://github.com/astamm/fdakma


Report a bug at https://github.com/astamm/fdakma/issues


Browse source code at https://github.com/cran/fdakma


Authors: Laura Sangalli [aut] , Piercesare Secchi [aut] , Aymeric Stamm [cre, ctb] , Simone Vantini [aut] , Valeria Vitelli [aut] , Alessandro Zito [ctb]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports cli, fdacluster, rlang


See at CRAN