return probabilities

This commit is contained in:
Łukasz Szymula 2020-04-27 15:36:17 +02:00
parent 0c3afb61f9
commit 7a6ac2dfb8
3 changed files with 10428 additions and 10428 deletions

File diff suppressed because it is too large Load Diff

View File

@ -16,15 +16,15 @@ def predict():
dev0_vectorizer = vectorizer.transform(devdoc) dev0_vectorizer = vectorizer.transform(devdoc)
testA_vectorizer = vectorizer.transform(testdoc) testA_vectorizer = vectorizer.transform(testdoc)
y_dev = clf.predict(dev0_vectorizer) y_dev = clf.predict_proba(dev0_vectorizer)
y_test = clf.predict(testA_vectorizer) y_test = clf.predict_proba(testA_vectorizer)
with open("dev-0/out.tsv", "w") as devout: with open("dev-0/out.tsv", "w") as devout:
for line in y_dev: for line in y_dev:
devout.write(line+"\n") devout.write(str(line[1])+"\n")
with open("test-A/out.tsv", "w") as testaout: with open("test-A/out.tsv", "w") as testaout:
for line in y_test: for line in y_test:
testaout.write(line+"\n") testaout.write(str(line[1])+"\n")
predict() predict()

File diff suppressed because it is too large Load Diff