Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Carlos-Francisco Méndez-Cruz
/
laigen-supervised-learning
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
2020-02-20 02:52:49 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
aa4eedf92dc476f9b536fad3740fcf5346cacb83
aa4eedf9
1 parent
a00f3bba
Classification Iris data set
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
iris-data-set/training-evaluation-iris-v1.py
iris-data-set/training-evaluation-iris-v1.py
View file @
aa4eedf
...
...
@@ -72,7 +72,7 @@ if __name__ == "__main__":
print
(
"File to read evaluation true classes: "
+
str
(
args
.
inputEvaluationClasses
))
print
(
"Path to place output files: "
+
str
(
args
.
outputPath
))
print
(
"File to write evaluation report: "
+
str
(
args
.
outputFile
))
print
(
"Classifier: "
+
str
(
args
.
outputFile
))
print
(
"Classifier: "
+
str
(
args
.
classifier
))
# Start time
t0
=
time
()
...
...
@@ -123,7 +123,7 @@ if __name__ == "__main__":
if
args
.
classifier
==
"MultinomialNB"
:
classifier
=
MultinomialNB
()
elif
args
.
classifier
==
"SVM"
:
classifier
=
SVC
()
classifier
=
SVC
(
kernel
=
"linear"
)
elif
args
.
classifier
==
"DecisionTree"
:
classifier
=
DecisionTreeClassifier
()
elif
args
.
classifier
==
"Perceptron"
:
...
...
@@ -154,9 +154,9 @@ if __name__ == "__main__":
oFile
.
write
(
"{}"
.
format
(
classifier
.
coef_
))
oFile
.
write
(
'Confidence scores:
\n
'
)
oFile
.
write
(
"{}"
.
format
(
confidence_scores
))
if
args
.
classifier
==
"SVM"
:
oFile
.
write
(
'Number of support vectors per class: {}
\n
'
.
format
(
classifier
.
n_support_
))
oFile
.
write
(
'Support vectors: {}
\n
'
.
format
(
classifier
.
support_vectors_
))
if
args
.
classifier
==
"SVM"
:
oFile
.
write
(
'Number of support vectors per class: {}
\n
'
.
format
(
classifier
.
n_support_
))
oFile
.
write
(
'Support vectors: {}
\n
'
.
format
(
classifier
.
support_vectors_
))
print
(
" Saving evaluation report done!"
)
...
...
Please
register
or
login
to post a comment