-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyeast_model_eval.py
32 lines (25 loc) · 1015 Bytes
/
yeast_model_eval.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import pandas as pd
method = ['bbgp', 'gcmh', 'ks']
shape = ['full', 'tied', ]
kmeans = ['elkan']
for i in range(1, 17):
labels = pd.DataFrame()
for m in method:
for s in shape:
PATH = '../LTE_CLUSTER/cluster/em_1d_' + m + '_' + s + str(i) + '/em_' + m.upper() + '_101.csv'
em = open(PATH, 'r')
emList = []
for line in em:
emList.append(line.strip().split(',\t')[0])
em.close()
print('em' + m + s, len(emList))
labels['em' + m + s] = emList
for k in kmeans:
PATH = '../LTE_CLUSTER/cluster/kmeans_1d_' + m + '_' + k + str(i) + '/KMEANS_' + m.upper() + '_' + str(i) + '.csv'
kmean = open(PATH, 'r')
kmeansList = []
for line in kmean:
kmeansList.append(line.strip())
kmean.close()
labels['kmeans' + m + k] = kmeansList
labels.to_csv('../LTE_CLUSTER/model_measure' + str(i) + '.csv', index=False)