opticskxi_pipeline {opticskxi} | R Documentation |
OPTICS k-Xi models comparison pipeline
Description
Computes OPTICS k-Xi models based on a parameter grid, binds results in a data frame, and computes distance based metrics for each model.
Usage
opticskxi_pipeline(m_data, df_params = expand.grid(n_xi = 1:10, pts =
c(20, 30, 40), dist = c("euclidean", "abscorrelation"), dim_red =
c("identity", "PCA", "ICA"), n_dimred_comp = c(5, 10, 20)),
n_cores = 1)
Arguments
m_data |
Data matrix |
df_params |
Parameter grid for the OPTICS k-Xi function call and optional dimension reduction. Required columns: n_xi, pts, dist. Optonal columns: dim_red, n_dim_red. |
n_cores |
Number of cores |
Value
Input parameter data frame with with results binded in columns optics, clusters and metrics.
See Also
get_best_kxi, ggplot_kxi_metrics, gtable_kxi_profiles
Examples
data('hla')
m_hla <- hla[-c(1:2)] %>% scale
df_params_hla <- expand.grid(n_xi = 3:5, pts = c(20, 30),
dist = c('manhattan', 'euclidean'))
df_kxi_hla <- opticskxi_pipeline(m_hla, df_params_hla)
ggplot_kxi_metrics(df_kxi_hla, n = 8)
gtable_kxi_profiles(df_kxi_hla) %>% plot
best_kxi_hla <- get_best_kxi(df_kxi_hla, rank = 2)
clusters_hla <- best_kxi_hla$clusters
fortify_pca(m_hla, sup_vars = data.frame(Clusters = clusters_hla)) %>%
ggpairs('Clusters', ellipses = TRUE, variables = TRUE)
[Package opticskxi version 0.1 Index]