a bunch of small changes

This commit is contained in:
Tanushree Tunstall 2023-02-19 17:22:15 +00:00
parent 4640f9024a
commit 777d3765cf
4 changed files with 14 additions and 8 deletions

View file

@ -292,7 +292,8 @@ def MultModelsCl(input_df
, ('SVC' , SVC(**rs) )
, ('Stochastic GDescent' , SGDClassifier(**rs, **njobs) )
, ('XGBoost' , XGBClassifier(**rs, verbosity = 0, use_label_encoder = False, **njobs) )
, ('Dummy Classifier' , DummyClassifier(strategy = 'most_frequent') )
#, ('Dummy Classifier' , DummyClassifier(strategy = 'most_frequent') )
, ('Dummy Classifier' , DummyClassifier(constant = 1) )
]
mm_skf_scoresD = {}

View file

@ -276,7 +276,8 @@ def MultModelsCl_CVs(input_df
, ('SVC' , SVC(**rs) )
, ('Stochastic GDescent' , SGDClassifier(**rs, **njobs) )
, ('XGBoost' , XGBClassifier(**rs, verbosity = 0, use_label_encoder = False, **njobs) )
, ('Dummy Classifier' , DummyClassifier(strategy = 'most_frequent') )
#, ('Dummy Classifier' , DummyClassifier(strategy = 'most_frequent') )
, ('Dummy Classifier' , DummyClassifier(constant = 1) )
]
mm_skf_scoresD = {}

View file

@ -2,15 +2,14 @@
#source("~/git/LSHTM_analysis/config/pnca.R")
#source("~/git/LSHTM_analysis/config/embb.R")
source("~/git/LSHTM_analysis/config/gid.R")
#source("~/git/LSHTM_analysis/config/alr.R")
#source("~/git/LSHTM_analysis/config/gid.R")
source("~/git/LSHTM_analysis/config/alr.R")
#source("~/git/LSHTM_analysis/config/katg.R")
#source("~/git/LSHTM_analysis/config/rpob.R")
# get plottting dfs
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
source("~/git/LSHTM_analysis/scripts/plotting/plotting_colnames.R")
#=======
# output
#=======
@ -210,8 +209,13 @@ if (nrow(bar_or) == nrow(sen1) + nrow(res1) ){
# percent for OR muts
pc_orR = nrow(res1)/(nrow(sen1) + nrow(res1)); pc_orR
cat("\nPercentage of muts with OR>1 i.e resistant:"
, pc_orR *100 )
cat("\nNo.of DST muts:", nrow(bar_or)
, "\nNo of DST (R):", table(bar_or$sensitivity)[[1]]
, "\nNo of DST (S):", table(bar_or$sensitivity)[[2]]
, "\nNumber of R muts with OR >1 (n = ", nrow(res1),")"
, "\nPercentage of muts with OR>1 i.e resistant:" , pc_orR *100 )
# muts with highest OR
head(bar_or$mutationinformation, 10)

View file

@ -7,7 +7,7 @@ source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/rpob/sens
pe_colour_map = c("DD_lig" = "#f0e68c" # khaki
, "SS_lig" = "#ffd700" # gold
, "DD_nucleic_acid"= "#d2b48c" # sandybrown
, "DD_nucleic_acid"= "#d2b48c" # tan or sandybrown
, "SS_nucleic_acid"= "#a0522d" # sienna
, "DD_ppi2" = "#da70d6" # orchid