Compare commits

..

1 Commits

Author SHA1 Message Date
kubapok
5c4bb10ddf fix config 2021-05-01 12:22:39 +02:00
3 changed files with 0 additions and 2026 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +0,0 @@
import numpy
import pandas
import sys
from sklearn.linear_model import LinearRegression
def predict(model, dir):
df = pandas.read_csv(dir+"/in.tsv", sep='\t', header=None, index_col=None)
input_x = numpy.array(df[1].tolist()).reshape(-1, 1)
pred = model.predict(input_x)
numpy.savetxt(dir + "/out.tsv", pred, fmt='%d', delimiter='\n')
trainCsv = pandas.read_csv("train/train.tsv", sep='\t', header=None, index_col=None)
data = {
'x': trainCsv[2].tolist(),
'y': trainCsv[0].tolist(),
}
x = numpy.array(data.get('x')).reshape(-1, 1)
y = numpy.array(data.get('y')).reshape(-1, 1)
model = LinearRegression()
model.fit(x, y)
predict(model, "dev-0")
predict(model, "test-A")

File diff suppressed because it is too large Load Diff