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
2019-04-09 12:57:34 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3470ade23c0e5e158e31c2bbfb08a4b69ff48a3e
3470ade2
1 parent
187a0c3a
Iris dataset for automatic clasification
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
clasificacion-automatica/iris-dataset/trainingEvaluation_Iris_v1.py
clasificacion-automatica/iris-dataset/trainingEvaluation_Iris_v1.py
View file @
3470ade
...
...
@@ -140,6 +140,7 @@ if __name__ == "__main__":
classifier
.
fit
(
dataTraining
,
trueTrainingClasses
)
print
(
" Prediction..."
)
y_pred
=
classifier
.
predict
(
dataEvaluation
)
confidence_scores
=
classifier
.
decision_function
(
dataEvaluation
)
print
(
" Training and predition done!"
)
# for i in range(len(trueClasses)):
...
...
@@ -162,9 +163,8 @@ if __name__ == "__main__":
oFile
.
write
(
'Classification report:
\n
'
)
oFile
.
write
(
classification_report
(
trueEvaluationClasses
,
y_pred
)
+
'
\n
'
)
if
options
.
classifier
==
"Perceptron"
:
oFile
.
write
(
"Perceptron
\n
"
)
for
coef
in
classifier
.
coefs_
:
oFile
.
write
(
"coef.shape: {}
\n
"
.
format
(
coef
.
shape
))
oFile
.
write
(
"{}"
.
format
(
confidence_scores
))
print
(
" Saving test report done!"
)
print
(
"Training and test done in:
%
fs"
%
(
time
()
-
t0
))
...
...
Please
register
or
login
to post a comment