a bunch of small changes
This commit is contained in:
parent
4640f9024a
commit
777d3765cf
4 changed files with 14 additions and 8 deletions
|
@ -292,7 +292,8 @@ def MultModelsCl(input_df
|
||||||
, ('SVC' , SVC(**rs) )
|
, ('SVC' , SVC(**rs) )
|
||||||
, ('Stochastic GDescent' , SGDClassifier(**rs, **njobs) )
|
, ('Stochastic GDescent' , SGDClassifier(**rs, **njobs) )
|
||||||
, ('XGBoost' , XGBClassifier(**rs, verbosity = 0, use_label_encoder = False, **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 = {}
|
mm_skf_scoresD = {}
|
||||||
|
|
|
@ -276,7 +276,8 @@ def MultModelsCl_CVs(input_df
|
||||||
, ('SVC' , SVC(**rs) )
|
, ('SVC' , SVC(**rs) )
|
||||||
, ('Stochastic GDescent' , SGDClassifier(**rs, **njobs) )
|
, ('Stochastic GDescent' , SGDClassifier(**rs, **njobs) )
|
||||||
, ('XGBoost' , XGBClassifier(**rs, verbosity = 0, use_label_encoder = False, **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 = {}
|
mm_skf_scoresD = {}
|
||||||
|
|
|
@ -2,15 +2,14 @@
|
||||||
#source("~/git/LSHTM_analysis/config/pnca.R")
|
#source("~/git/LSHTM_analysis/config/pnca.R")
|
||||||
|
|
||||||
#source("~/git/LSHTM_analysis/config/embb.R")
|
#source("~/git/LSHTM_analysis/config/embb.R")
|
||||||
source("~/git/LSHTM_analysis/config/gid.R")
|
#source("~/git/LSHTM_analysis/config/gid.R")
|
||||||
#source("~/git/LSHTM_analysis/config/alr.R")
|
source("~/git/LSHTM_analysis/config/alr.R")
|
||||||
#source("~/git/LSHTM_analysis/config/katg.R")
|
#source("~/git/LSHTM_analysis/config/katg.R")
|
||||||
#source("~/git/LSHTM_analysis/config/rpob.R")
|
#source("~/git/LSHTM_analysis/config/rpob.R")
|
||||||
|
|
||||||
# get plottting dfs
|
# get plottting dfs
|
||||||
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||||
|
|
||||||
source("~/git/LSHTM_analysis/scripts/plotting/plotting_colnames.R")
|
|
||||||
#=======
|
#=======
|
||||||
# output
|
# output
|
||||||
#=======
|
#=======
|
||||||
|
@ -210,8 +209,13 @@ if (nrow(bar_or) == nrow(sen1) + nrow(res1) ){
|
||||||
|
|
||||||
# percent for OR muts
|
# percent for OR muts
|
||||||
pc_orR = nrow(res1)/(nrow(sen1) + nrow(res1)); pc_orR
|
pc_orR = nrow(res1)/(nrow(sen1) + nrow(res1)); pc_orR
|
||||||
cat("\nPercentage of muts with OR>1 i.e resistant:"
|
cat("\nNo.of DST muts:", nrow(bar_or)
|
||||||
, pc_orR *100 )
|
, "\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
|
# muts with highest OR
|
||||||
head(bar_or$mutationinformation, 10)
|
head(bar_or$mutationinformation, 10)
|
||||||
|
|
|
@ -7,7 +7,7 @@ source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/rpob/sens
|
||||||
pe_colour_map = c("DD_lig" = "#f0e68c" # khaki
|
pe_colour_map = c("DD_lig" = "#f0e68c" # khaki
|
||||||
, "SS_lig" = "#ffd700" # gold
|
, "SS_lig" = "#ffd700" # gold
|
||||||
|
|
||||||
, "DD_nucleic_acid"= "#d2b48c" # sandybrown
|
, "DD_nucleic_acid"= "#d2b48c" # tan or sandybrown
|
||||||
, "SS_nucleic_acid"= "#a0522d" # sienna
|
, "SS_nucleic_acid"= "#a0522d" # sienna
|
||||||
|
|
||||||
, "DD_ppi2" = "#da70d6" # orchid
|
, "DD_ppi2" = "#da70d6" # orchid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue