mean from train

This commit is contained in:
kubapok 2022-02-12 19:46:31 +01:00
parent 4af7692f9e
commit c534b3035b
3 changed files with 38241 additions and 0 deletions

19120
dev-0/out.tsv Normal file

File diff suppressed because it is too large Load Diff

26
mean_from_train/run.py Normal file
View File

@ -0,0 +1,26 @@
import pandas as pd
from tqdm import tqdm
import numpy as np
#r = pd.read_csv('../train/expected.tsv', header = None,sep='\t')
years = list()
with tqdm(open('../train/expected.tsv'), total=1_000_000) as f_in:
for line in f_in:
y_min, y_max = line.rstrip().split(',')
years.append(float(y_min))
years.append(float(y_max))
mean = np.mean(years)
mean = str(mean)
#mean = str(float(r.mean()))
print('mean: ' + mean)
with open('../dev-0/out.tsv','w') as f_out, open('../dev-0/in.tsv', 'r') as f_in:
for line in f_in:
f_out.write(mean + '\n')
with open('../test-A/out.tsv','w') as f_out, open('../test-A/in.tsv', 'r') as f_in:
for line in f_in:
f_out.write(mean + '\n')

19095
test-A/out.tsv Normal file

File diff suppressed because it is too large Load Diff