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 05:16:28 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
63b71f1cb8f891bc8b49bc039245286635a5740d
63b71f1c
1 parent
cbd3cc2e
Training, crossvalidation and testing structural domain dataset
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
clasificacion-automatica/structural-domain-dataset/training-crossvalidation-testing-dom.py
clasificacion-automatica/structural-domain-dataset/training-crossvalidation-testing-dom.py
View file @
63b71f1
...
...
@@ -208,12 +208,12 @@ if __name__ == "__main__":
print
(
" Done!"
)
print
(
" Number of training classes: {}"
.
format
(
len
(
y_train
)))
print
(
" Number of training class
RI
: {}"
.
format
(
y_train
.
count
(
'DOM'
)))
print
(
" Number of training class
DOM
: {}"
.
format
(
y_train
.
count
(
'DOM'
)))
print
(
" Number of training class OTHER: {}"
.
format
(
y_train
.
count
(
'OTHER'
)))
print
(
" Shape of training matrix: {}"
.
format
(
X_train
.
shape
))
print
(
" Number of testing classes: {}"
.
format
(
len
(
y_test
)))
print
(
" Number of testing class
RI
: {}"
.
format
(
y_test
.
count
(
'DOM'
)))
print
(
" Number of testing class
DOM
: {}"
.
format
(
y_test
.
count
(
'DOM'
)))
print
(
" Number of testing class OTHER: {}"
.
format
(
y_test
.
count
(
'OTHER'
)))
print
(
" Shape of testing matrix: {}"
.
format
(
X_test
.
shape
))
...
...
@@ -276,13 +276,13 @@ if __name__ == "__main__":
print
(
" Done!"
)
print
(
"Training..."
)
c
lassifier
.
fit
(
X_train
,
y_train
)
myC
lassifier
.
fit
(
X_train
,
y_train
)
print
(
" Done!"
)
print
(
"Testing (prediction in new data)..."
)
if
args
.
reduction
is
not
None
:
X_test
=
reduc
.
transform
(
X_test
)
y_pred
=
c
lassifier
.
predict
(
X_test
)
y_pred
=
myC
lassifier
.
predict
(
X_test
)
print
(
" Done!"
)
print
(
"Saving report..."
)
...
...
Please
register
or
login
to post a comment