Cluster_choice: Cluster Choice

Description Usage Arguments Value

View source: R/cluster_choice.R

Description

Cluster_choice() calcolate the BIC and AIC values with respect of different number of cluster (k) and dimension of the cluster mean space (h). The Bayes information criterion (BIC) is a method useful to choose the number of clusters in a certain data sets. Then to rightly estimate the value of the cluster we compare them, choosing the cluster with the minimum BIC value, (same for AIC). Since it requires fitting the model for each potential number of clusters and dimensions of the mean space, each output from the Functional Clustering Method (FCM) is saved in the list FCM_all, per each k and h. Furthermore, insering the PCA percentages calculated with the function PCAbarplot, the dimension h is choosen automatically, so that the sum of the first h percentages is greater than 95 percent.

Usage

1
Cluster_choice(databaseTr, K, h = NULL, PCAperc = NULL)

Arguments

databaseTr

List containing the number of observations per each curve (called LenCurv), and a data frame constituted from the curves' ID, observed values and the respective times, that might be truncated at a specific time or not. It is generated automatically from the function DataImport() or DataTruncation() if we want consider a truncation time.

K

Number of clusters, it could be a vector.

h

Dimension of the cluster mean space. As default is NULL, so that using the percentages from the PCA it is possible to estimate a value for it such that the sum of the first h percentages is greater than 95 percent.

PCAperc

The PCA percentages calculated with the function PCAbarplot, if it is NULL (default) then it must insert in input a value for h.

Value

List containing the matrixes in which are stored the AIC and Bic values for different h and k, and a list with the FCM's outputs.


mbeccuti/Prova documentation built on May 20, 2019, 5:26 p.m.