Perform kernel kmeans clustering for a different combinations of indices and kernel
Usage
clustInd_kkmeans(
ind_data,
vars_combinations,
kernel_list = c("rbfdot", "polydot"),
n_cluster = 2,
true_labels = NULL,
n_cores = 1
)
Arguments
- ind_data
Dataframe containing indices applied to the original data and its first and second derivatives. See generate_indices.
- vars_combinations
list
containing one or more combinations of indices inind_data
. If it is non-named, the names of the variables are set to vars1, ..., varsk, where k is the number of elements invars_combinations
.- kernel_list
List of kernels
- n_cluster
Number of clusters to create
- true_labels
Vector of true labels for validation (if it is not known true_labels is set to NULL)
- n_cores
Number of cores to do parallel computation. 1 by default, which mean no parallel execution.
Examples
vars1 <- c("dtaEI", "dtaMEI")
vars2 <- c("dtaHI", "dtaMHI")
data <- ehymet::sim_model_ex1()
data_ind <- generate_indices(data)
clustInd_kkmeans(data_ind, list(vars1, vars2))
#> Using automatic sigma estimation (sigest) for RBF or laplace kernel
#> Using automatic sigma estimation (sigest) for RBF or laplace kernel
#> Setting default kernel parameters
#> Setting default kernel parameters
#> $kkmeans_rbfdot_dtaEIdtaMEI
#> $kkmeans_rbfdot_dtaEIdtaMEI$cluster
#> [1] 1 2 2 2 2 1 2 1 1 2 2 2 1 2 1 1 2 2 1 2 1 1 1 1 2 2 2 1 1 2 2 2 2 2 2 2 2
#> [38] 2 2 1 2 1 2 2 2 2 2 1 2 2 1 1 1 1 1 1 1 2 2 1 1 1 2 1 2 2 1 1 2 1 1 1 2 1
#> [75] 1 2 2 2 1 1 1 1 1 1 2 1 1 1 2 1 1 2 1 1 1 1 1 2 2 1
#>
#> $kkmeans_rbfdot_dtaEIdtaMEI$internal_metrics
#> $kkmeans_rbfdot_dtaEIdtaMEI$internal_metrics$davies_bouldin
#> [1] 1.458379
#>
#> $kkmeans_rbfdot_dtaEIdtaMEI$internal_metrics$dunn
#> [1] 0.01120901
#>
#> $kkmeans_rbfdot_dtaEIdtaMEI$internal_metrics$silhouette
#> [1] 0.3107621
#>
#> $kkmeans_rbfdot_dtaEIdtaMEI$internal_metrics$infomax
#> [1] 0.9988455
#>
#>
#> $kkmeans_rbfdot_dtaEIdtaMEI$time
#> [1] 0.01761675
#>
#>
#> $kkmeans_rbfdot_dtaHIdtaMHI
#> $kkmeans_rbfdot_dtaHIdtaMHI$cluster
#> [1] 1 2 1 2 1 1 1 2 2 1 2 2 2 1 2 2 2 2 2 1 1 1 2 1 2 2 2 2 1 2 1 2 1 1 2 2 2
#> [38] 2 2 1 2 2 2 1 2 1 1 2 2 2 2 1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 1 1 2 2 1 2
#> [75] 1 2 2 1 2 1 2 1 2 2 2 1 1 1 2 2 1 2 1 1 1 1 1 1 2 2
#>
#> $kkmeans_rbfdot_dtaHIdtaMHI$internal_metrics
#> $kkmeans_rbfdot_dtaHIdtaMHI$internal_metrics$davies_bouldin
#> [1] 1.552428
#>
#> $kkmeans_rbfdot_dtaHIdtaMHI$internal_metrics$dunn
#> [1] 0.0115923
#>
#> $kkmeans_rbfdot_dtaHIdtaMHI$internal_metrics$silhouette
#> [1] 0.3362841
#>
#> $kkmeans_rbfdot_dtaHIdtaMHI$internal_metrics$infomax
#> [1] 1
#>
#>
#> $kkmeans_rbfdot_dtaHIdtaMHI$time
#> [1] 0.01081181
#>
#>
#> $kkmeans_polydot_dtaEIdtaMEI
#> $kkmeans_polydot_dtaEIdtaMEI$cluster
#> [1] 1 2 1 2 1 1 1 2 2 1 2 2 2 2 2 2 2 2 2 1 1 1 2 1 2 2 2 2 1 2 1 2 1 1 2 2 2
#> [38] 2 2 1 2 2 2 2 2 1 1 2 2 2 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1
#> [75] 1 2 2 1 1 1 1 1 1 1 2 1 1 1 2 1 1 2 1 1 1 1 1 2 2 2
#>
#> $kkmeans_polydot_dtaEIdtaMEI$internal_metrics
#> $kkmeans_polydot_dtaEIdtaMEI$internal_metrics$davies_bouldin
#> [1] 0.6690505
#>
#> $kkmeans_polydot_dtaEIdtaMEI$internal_metrics$dunn
#> [1] 0.01564565
#>
#> $kkmeans_polydot_dtaEIdtaMEI$internal_metrics$silhouette
#> [1] 0.5272745
#>
#> $kkmeans_polydot_dtaEIdtaMEI$internal_metrics$infomax
#> [1] 0.985815
#>
#>
#> $kkmeans_polydot_dtaEIdtaMEI$time
#> [1] 0.01266742
#>
#>
#> $kkmeans_polydot_dtaHIdtaMHI
#> $kkmeans_polydot_dtaHIdtaMHI$cluster
#> [1] 1 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 1 2 1 2 1 1 2 2 2
#> [38] 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 2 1 1 1 2 1
#> [75] 1 2 2 2 1 1 1 1 1 1 2 1 1 1 2 1 1 2 1 1 1 1 1 2 2 2
#>
#> $kkmeans_polydot_dtaHIdtaMHI$internal_metrics
#> $kkmeans_polydot_dtaHIdtaMHI$internal_metrics$davies_bouldin
#> [1] 0.6134443
#>
#> $kkmeans_polydot_dtaHIdtaMHI$internal_metrics$dunn
#> [1] 0.02153625
#>
#> $kkmeans_polydot_dtaHIdtaMHI$internal_metrics$silhouette
#> [1] 0.5476103
#>
#> $kkmeans_polydot_dtaHIdtaMHI$internal_metrics$infomax
#> [1] 0.9988455
#>
#>
#> $kkmeans_polydot_dtaHIdtaMHI$time
#> [1] 0.01275516
#>
#>