Showing
2 changed files
with
2 additions
and
3 deletions
... | @@ -45,8 +45,7 @@ def import_ncRNA(path): | ... | @@ -45,8 +45,7 @@ def import_ncRNA(path): |
45 | ''' | 45 | ''' |
46 | Plot function | 46 | Plot function |
47 | ''' | 47 | ''' |
48 | -def plot_repartition(data,m,n,name): | 48 | +def plot_repartition(data,m,n,name,labels_names): |
49 | - labels_names = [str(x) for x in data[0]] | ||
50 | repartition = data[1] | 49 | repartition = data[1] |
51 | dico = [] | 50 | dico = [] |
52 | N = np.sum(repartition) | 51 | N = np.sum(repartition) | ... | ... |
... | @@ -37,7 +37,7 @@ def save_pred(som,data,data_names,y,proba,bmu,path): | ... | @@ -37,7 +37,7 @@ def save_pred(som,data,data_names,y,proba,bmu,path): |
37 | 37 | ||
38 | np.savetxt(path+"result.txt",res,header="Sequence_name\tBMU\tlabel"+"".join(["\tproba_class_"+str(i) for i in range(proba.shape[1])]),delimiter="\t",fmt="%s") | 38 | np.savetxt(path+"result.txt",res,header="Sequence_name\tBMU\tlabel"+"".join(["\tproba_class_"+str(i) for i in range(proba.shape[1])]),delimiter="\t",fmt="%s") |
39 | rep,_ = som.repartition_map(data,y) | 39 | rep,_ = som.repartition_map(data,y) |
40 | - plot_repartition(rep,som.dim[0],som.dim[1],path+"plot_repartition") | 40 | + plot_repartition(rep,som.dim[0],som.dim[1],path+"plot_repartition",y_label) |
41 | plot_density(np.array(y_label), proba,path+"plot_density.png") | 41 | plot_density(np.array(y_label), proba,path+"plot_density.png") |
42 | 42 | ||
43 | def main(): | 43 | def main(): | ... | ... |
-
Please register or login to post a comment