mean from train
This commit is contained in:
parent
eb6a5423d7
commit
c7fb59e7da
3
dev-0/join_out.py
Normal file
3
dev-0/join_out.py
Normal file
@ -0,0 +1,3 @@
|
||||
with open('out1.tsv') as fo1, open('out2.tsv') as fo2, open('out.tsv','w') as fo:
|
||||
for lo1, lo2 in zip(fo1, fo2):
|
||||
fo.write(lo1.rstrip('\n') + '\t' + lo2.rstrip('\n') + '\n')
|
36757
dev-0/out.tsv
Normal file
36757
dev-0/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
20
mean_from_train/mean_from_train.py
Normal file
20
mean_from_train/mean_from_train.py
Normal file
@ -0,0 +1,20 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
train_exp_f = open('../train/expected2.tsv')
|
||||
train_mean = np.mean([float(a.rstrip()) for a in train_exp_f])
|
||||
train_mean_line = str(train_mean) + '\n'
|
||||
|
||||
|
||||
def pred(in_f_path, out_f_path):
|
||||
f_in = open(in_f_path, 'r')
|
||||
f_out = open(out_f_path, 'w')
|
||||
|
||||
for l in f_in:
|
||||
f_out.write(train_mean_line)
|
||||
|
||||
f_in.close()
|
||||
f_out.close()
|
||||
|
||||
pred('../dev-0/in.tsv', '../dev-0/out2.tsv')
|
||||
pred('../test-A/in.tsv', '../test-A/out2.tsv')
|
36792
test-A/out.tsv
Normal file
36792
test-A/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user