Learn R Programming

emcAdr (version 1.2)

get_dissimilarity_from_genetic_results: Recover the square matrix of distance between cocktails where the index (i,j) of the matrix is the distance between cocktails i and j in the genetic_results list.

Description

Recover the square matrix of distance between cocktails where the index (i,j) of the matrix is the distance between cocktails i and j in the genetic_results list.

Usage

get_dissimilarity_from_genetic_results(genetic_results, ATCtree, normalization)

Value

The square matrix of distances between cocktails

Arguments

genetic_results

the List returned by the genetic algorithm.

ATCtree

: ATC tree with upper bound of the DFS (without the root)

normalization

: Do we keep the distance between cocktail in the range [0;1] ?

Examples

Run this code
# \donttest{
 data("ATC_Tree_UpperBound_2024")
 data("FAERS_myopathy")
 
 genetic_results = GeneticAlgorithm(epochs = 10, nbIndividuals = 10,
            ATCtree = ATC_Tree_UpperBound_2024,
            observations = FAERS_myopathy)
 distance_matrix = get_dissimilarity_from_genetic_results(genetic_results = genetic_results,
                        ATCtree = ATC_Tree_UpperBound_2024, normalization = TRUE)
# }

Run the code above in your browser using DataLab