Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bioNLP-UNAM
/
useless
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Carlos-Francisco Méndez-Cruz
2018-04-03 20:37:47 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5d820c1f651a5c65789083568a1d2003ddf03bed
5d820c1f
1 parent
98b2335f
Final version binClass for papers
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
filter_papers.py
filter_papers.py
View file @
5d820c1
...
...
@@ -102,9 +102,11 @@ if args.traind and not args.input:
if
args
.
split
:
X
=
vectorizer
.
transform
(
X_test
)
y_pred
=
clf
.
predict
(
X
)
print
(
precision_score
(
y_test
,
y_pred
))
print
(
recall_score
(
y_test
,
y_pred
))
print
(
f1_score
(
y_test
,
y_pred
))
print
(
"Test results: "
)
print
(
"Precision: {}"
.
format
(
precision_score
(
y_test
,
y_pred
)))
print
(
"Recall: {}"
.
format
(
recall_score
(
y_test
,
y_pred
)))
print
(
"F-score: {}"
.
format
(
f1_score
(
y_test
,
y_pred
)))
print
(
"Classification report:"
)
print
(
classification_report
(
y_test
,
y_pred
))
else
:
from
pdb
import
set_trace
as
st
...
...
Please
register
or
login
to post a comment