most common value in train
This commit is contained in:
parent
c5d9b752dc
commit
2cfd344ac5
122480
dev-0/out.tsv
122480
dev-0/out.tsv
File diff suppressed because it is too large
Load Diff
10
solutions/most_common_value_in_train.py
Normal file
10
solutions/most_common_value_in_train.py
Normal file
@ -0,0 +1,10 @@
|
||||
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', 'test-B':
|
||||
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')
|
121314
test-A/out.tsv
121314
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
72402
test-B/out.tsv
72402
test-B/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user