Learn R Programming

emcAdr (version 1.2)

clustering_genetic_algorithm: Clustering of the solutions of the genetic algorithm using the hclust algorithm

Description

Clustering of the solutions of the genetic algorithm using the hclust algorithm

Usage

clustering_genetic_algorithm(
  genetic_results,
  ATCtree,
  dist.normalize = TRUE,
  umap_config = NULL
)

Value

A dataframe containing UMAP 1/2 the two coordinates of each cocktails in the plane as well as the cluster number of each cocktails

Arguments

genetic_results

A list of cocktails in the form of integer vector

ATCtree

ATC tree with upper bound of the DFS

dist.normalize

Do we normalize the distance (so it belongs to [0;1])

umap_config

The configuration to use in order to project the cocktails in a smaller space (umap::umap.defaults by default)

Examples

Run this code
# \donttest{
 data("ATC_Tree_UpperBound_2024")

 results = GeneticAlgorithm(epochs = 10, nbIndividuals = 10, 
            ATCtree = ATC_Tree_UpperBound_2024,
            observations = FAERS_myopathy)

 hclust_genetic_solution(genetic_results = results,
                 ATCtree = ATC_Tree_UpperBound_2024)
# }

Run the code above in your browser using DataLab