Compare commits

..

1 Commits

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

View File

@ -1 +1 @@
--precision 1
--metric RMSE --precision 1

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +0,0 @@
import numpy as np
from sklearn import preprocessing
from sklearn.pipeline import make_pipeline
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LinearRegression
from sklearn import linear_model
import pandas as pd
train=pd.read_csv('train/train.tsv',sep='\t',names=['price','mileage','year','brand','engineType','engineCapacity'])
df = pd.DataFrame(train,columns=['price','mileage','year','brand','engineType','engineCapacity'])
Y=df[['price']]
X=df[['year','mileage','engineCapacity']]
reg = linear_model.LinearRegression()
reg.fit(X, Y)
inn=pd.read_csv('dev-0/in.tsv',sep='\t',names=['mileage','year','brand','engineType','engineCapacity'])
df = pd.DataFrame(inn,columns=['mileage','year','brand','engineType','engineCapacity'])
r=df[['year','mileage','engineCapacity']]
y_pred=reg.predict(r)
y_pred=np.concatenate(y_pred)
t=np.array2string(y_pred, precision=5, separator='\n',suppress_small=True)
t=t.lstrip('[').rstrip(']')
f = open("dev-0/out.tsv", "a")
f.write(t)

View File

@ -1,24 +0,0 @@
import numpy as np
from sklearn import preprocessing
from sklearn.pipeline import make_pipeline
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LinearRegression
from sklearn import linear_model
import pandas as pd
train=pd.read_csv('train/train.tsv',sep='\t',names=['price','mileage','year','brand','engineType','engineCapacity'])
df = pd.DataFrame(train,columns=['price','mileage','year','brand','engineType','engineCapacity'])
Y=df[['price']]
X=df[['year','mileage','engineCapacity']]
reg = linear_model.LinearRegression()
reg.fit(X, Y)
inn=pd.read_csv('test-A/in.tsv',sep='\t',names=['mileage','year','brand','engineType','engineCapacity'])
df = pd.DataFrame(inn,columns=['mileage','year','brand','engineType','engineCapacity'])
r=df[['year','mileage','engineCapacity']]
y_pred=reg.predict(r)
y_pred=np.concatenate(y_pred)
t=np.array2string(y_pred, precision=5, separator='\n',suppress_small=True)
t=t.lstrip('[').rstrip(']')
f = open("test-A/out.tsv", "a")
f.write(t)

File diff suppressed because it is too large Load Diff