Mercurial > repos > rnateam > graphclust_postprocessing
comparison evaluation.py @ 3:79b9117aef01 draft
planemo upload for repository https://github.com/eteriSokhoyan/galaxytools/tree/branchForIterations/tools/GraphClust/CollectResults commit c03cf64554289eb098267c0923cf0cf7b245cc0c
| author | rnateam |
|---|---|
| date | Wed, 04 Jan 2017 18:15:07 -0500 |
| parents | b8e32e577597 |
| children | 4310ac018d05 |
comparison
equal
deleted
inserted
replaced
| 2:b8e32e577597 | 3:79b9117aef01 |
|---|---|
| 47 toWrite += listOfClasses[i] + "\t" + listOfClusters[i] + '\n' | 47 toWrite += listOfClasses[i] + "\t" + listOfClusters[i] + '\n' |
| 48 with open("RESULTS/fullTab.tabular", "w") as full: | 48 with open("RESULTS/fullTab.tabular", "w") as full: |
| 49 full.write(toWrite) | 49 full.write(toWrite) |
| 50 | 50 |
| 51 | 51 |
| 52 listOfClasses = [] | |
| 53 listOfClusters = [] | |
| 54 pattern = re.compile("^RF.*$") | 52 pattern = re.compile("^RF.*$") |
| 55 | 53 |
| 56 | 54 |
| 57 if len(listOfClasses) > 0 and pattern.match(str(listOfClasses[0])): | 55 if len(listOfClasses) > 0 and pattern.match(str(listOfClasses[0])): |
| 58 with open("RESULTS/fullTab.tabular", "r") as tabF: | |
| 59 for line in tabF.readlines(): | |
| 60 listOfClasses.append(line.split()[0]) | |
| 61 listOfClusters.append(line.split()[1]) | |
| 62 | 56 |
| 63 completeness_score = metrics.completeness_score(listOfClasses, listOfClusters) | 57 completeness_score = metrics.completeness_score(listOfClasses, listOfClusters) |
| 64 homogeneity_score = metrics.homogeneity_score(listOfClasses, listOfClusters) | 58 homogeneity_score = metrics.homogeneity_score(listOfClasses, listOfClusters) |
| 65 adjusted_rand_score = metrics.adjusted_rand_score(listOfClasses, listOfClusters) | 59 adjusted_rand_score = metrics.adjusted_rand_score(listOfClasses, listOfClusters) |
| 66 adjusted_mutual_info_score = metrics.adjusted_mutual_info_score(listOfClasses, listOfClusters) | 60 adjusted_mutual_info_score = metrics.adjusted_mutual_info_score(listOfClasses, listOfClusters) |
