forked from kubapok/auta-public
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5c4bb10ddf |
@ -1 +1 @@
|
|||||||
--precision 1
|
--metric RMSE --precision 1
|
||||||
|
1000
dev-0/out.tsv
1000
dev-0/out.tsv
File diff suppressed because it is too large
Load Diff
@ -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)
|
|
@ -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)
|
|
1000
test-A/out.tsv
1000
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user