Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Carlos-Francisco Méndez-Cruz
/
lcg-bioinfoI-bionlp
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-09-20 02:33:26 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d802830032cb764c32d0e74af91bfcb41723ce68
d8028300
1 parent
1cbaf971
Training, crossvalidation and testing binding thrombin dataset
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
clasificacion-automatica/binding-thrombin-dataset/training-crossvalidation-testing-binding-thrombin.py
clasificacion-automatica/binding-thrombin-dataset/training-crossvalidation-testing-binding-thrombin.py
View file @
d802830
...
...
@@ -234,13 +234,17 @@ if __name__ == "__main__":
print
(
" Done!"
)
print
(
"Testing (prediction in new data)..."
)
if
args
.
reduction
is
not
None
:
X_test
=
reduc
.
transform
(
X_test
)
y_pred
=
classifier
.
predict
(
X_test
)
print
(
" Done!"
)
print
(
"Saving report..."
)
with
open
(
os
.
path
.
join
(
args
.
outputReportPath
,
args
.
outputReportFile
),
mode
=
'w'
,
encoding
=
'utf8'
)
as
oFile
:
oFile
.
write
(
'********** EVALUATION REPORT **********
\n
'
)
oFile
.
write
(
'Reduction: {}
\n
'
.
format
(
args
.
reduction
))
oFile
.
write
(
'Classifier: {}
\n
'
.
format
(
args
.
classifier
))
oFile
.
write
(
'Kernel: {}
\n
'
.
format
(
args
.
kernel
))
oFile
.
write
(
'Accuracy: {}
\n
'
.
format
(
accuracy_score
(
y_test
,
y_pred
)))
oFile
.
write
(
'Precision: {}
\n
'
.
format
(
precision_score
(
y_test
,
y_pred
,
average
=
'weighted'
)))
oFile
.
write
(
'Recall: {}
\n
'
.
format
(
recall_score
(
y_test
,
y_pred
,
average
=
'weighted'
)))
...
...
Please
register
or
login
to post a comment