s444415
This commit is contained in:
parent
d3d2656597
commit
ab3072e91a
2
run.py
2
run.py
@ -3,7 +3,6 @@ from sklearn.naive_bayes import GaussianNB
|
|||||||
from sklearn.feature_extraction.text import TfidfVectorizer
|
from sklearn.feature_extraction.text import TfidfVectorizer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def read_train_data():
|
def read_train_data():
|
||||||
print('Load train data')
|
print('Load train data')
|
||||||
train_data = pd.read_csv("train/train.tsv", sep='\t', header=None)
|
train_data = pd.read_csv("train/train.tsv", sep='\t', header=None)
|
||||||
@ -38,5 +37,4 @@ def get_result():
|
|||||||
x, x_p = vectorize(x, x_p)
|
x, x_p = vectorize(x, x_p)
|
||||||
return calc_score(x, y, x_p)
|
return calc_score(x, y, x_p)
|
||||||
|
|
||||||
|
|
||||||
pd.DataFrame(get_result()).to_csv("dev-0/out.tsv", header=False, index=None)
|
pd.DataFrame(get_result()).to_csv("dev-0/out.tsv", header=False, index=None)
|
Loading…
Reference in New Issue
Block a user