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:29:51 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
09ed9ebc165f4a7ae7cf5a2febe08b1ed23379f0
09ed9ebc
1 parent
158e7f6c
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 @
09ed9eb
...
...
@@ -135,7 +135,7 @@ if __name__ == "__main__":
elif
options
.
classifier
==
"DecisionTree"
:
classifier
=
DecisionTreeClassifier
()
elif
options
.
classifier
==
"MLPClassifier"
:
classifier
=
MLPClassifier
(
solver
=
'lbfgs'
)
classifier
=
MLPClassifier
(
solver
=
'lbfgs'
,
hidden_layer_sizes
=
(
3
)
)
print
(
" Training..."
)
...
...
@@ -163,10 +163,10 @@ if __name__ == "__main__":
oFile
.
write
(
str
(
confusion_matrix
(
trueEvaluationClasses
,
y_pred
))
+
'
\n
'
)
oFile
.
write
(
'Classification report:
\n
'
)
oFile
.
write
(
classification_report
(
trueEvaluationClasses
,
y_pred
)
+
'
\n
'
)
oFile
.
write
(
"Weight matrices:
\n
"
)
if
options
.
classifier
==
"MLPClassifier"
:
oFile
.
write
(
"Weight matrices
\n
"
)
for
coef
in
classifier
.
coefs_
:
oFile
.
write
(
"
{}"
.
format
(
coef
))
oFile
.
write
(
"
coef.shape: {}"
.
format
(
coef
.
shape
))
print
(
" Saving test report done!"
)
print
(
"Training and test done in:
%
fs"
%
(
time
()
-
t0
))
...
...
Please
register
or
login
to post a comment