trueDistributionDrugs {emcAdr} | R Documentation |
The true distribution of the score among every single nodes of the ATC
Description
The true distribution of the score among every single nodes of the ATC
Usage
trueDistributionDrugs(
ATCtree,
observations,
beta,
max_score = 1000L,
nbResults = 100L,
num_thread = 1L
)
Arguments
ATCtree |
: ATC tree with upper bound of the DFS (without the root) |
observations |
: observation of the AE based on the medications of each patients (a DataFrame containing the medication on the first column and the ADR (boolean) on the second) on which we want to compute the risk distribution |
beta |
: minimum number of person taking the cocktails in order to consider it in the beta score distribution |
max_score |
: maximum number the score can take. Score greater than this one would be added to the distribution as the value max_score. Default is 1000 |
nbResults |
: Number of returned solution (Cocktail with the best oberved score during the run), 100 by default |
num_thread |
: Number of thread to run in parallel if openMP is available, 1 by default |
Value
Return a List containing : - ScoreDistribution : the distribution of the score as an array with each cells representing the number of risks = (index-1)/ 10 - Filtered_score_distribution : Distribution containing score for cocktails taken by at least beta patients. - Outstanding_score : An array of the score greater than max_score, - Best_cocktails : the nbResults bests cocktails encountered during the run. - Best_cocktails_beta : the nbResults bests cocktails taken by at least beta patients encountered during the run. - Best_scores : Score corresponding to the Best_cocktails. - Best_scores_beta : Score corresponding to the Best_cocktails_beta.
Examples
data("ATC_Tree_UpperBound_2024")
data("FAERS_myopathy")
size_1_score_distribution = trueDistributionDrugs(ATCtree = ATC_Tree_UpperBound_2024,
observations = FAERS_myopathy[1:100,], beta = 4)