return probabilities
This commit is contained in:
parent
0c3afb61f9
commit
7a6ac2dfb8
10544
dev-0/out.tsv
10544
dev-0/out.tsv
File diff suppressed because it is too large
Load Diff
@ -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()
|
||||||
|
10304
test-A/out.tsv
10304
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user