TEMP -> ml_iterator

This commit is contained in:
Tanushree Tunstall 2022-06-29 22:20:23 +01:00
parent 50cb36f2b3
commit 7eef463915

12
scripts/ml/TEMP → scripts/ml/ml_iterator.py Normal file → Executable file
View file

@ -32,13 +32,13 @@ combined_model_paramD = {'data_combined_model' : False
#ml_genes = ["pncA", "embB", "katG", "rpoB", "gid"]
ml_gene_drugD = {'pncA' : 'pyrazinamide'
# , 'embB' : 'ethambutol'
# , 'katG' : 'isoniazid'
# , 'rpoB' : 'rifampicin'
# , 'gid' : 'streptomycin'
, 'embB' : 'ethambutol'
, 'katG' : 'isoniazid'
, 'rpoB' : 'rifampicin'
, 'gid' : 'streptomycin'
}
gene_dataD={}
split_types = ['70_30', '80_20']
split_types = ['70_30', '80_20', 'sl']
split_data_types = ['actual', 'complete']
for gene, drug in ml_gene_drugD.items():
@ -98,5 +98,5 @@ for gene, drug in ml_gene_drugD.items():
out_wf= pd.concat(mmDD, ignore_index = True)
out_wf_f = out_wf.sort_values(by = ['resampling', 'source_data', 'MCC'], ascending = [True, True, False], inplace = False)
out_wf_f.to_csv(('/tmp/'+out_filename), index = False)
out_wf_f.to_csv(('/home/tanu/git/Data/ml_combined/genes/'+out_filename), index = False)