most common value in train
This commit is contained in:
parent
c8a53ba235
commit
161712a7a4
149134
dev-0/out.tsv
Normal file
149134
dev-0/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
11
most_common_from_train/a.py
Normal file
11
most_common_from_train/a.py
Normal file
@ -0,0 +1,11 @@
|
||||
import pandas as pd
|
||||
|
||||
r_out = pd.read_csv('../train/expected.tsv', names = ('class',))
|
||||
most_common = r_out['class'].value_counts().idxmax()
|
||||
|
||||
|
||||
for dataset in 'dev-0', 'test-A':
|
||||
with open(f'../{dataset}/out.tsv', 'w') as f_out, open(f'../{dataset}/in.tsv', 'r') as f_in:
|
||||
for line_in in f_in:
|
||||
f_out.write(most_common + '\n')
|
||||
|
148308
test-A/out.tsv
Normal file
148308
test-A/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user