Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
antifragility
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ana Pamela Osuna Vargas
antifragility
Commits
d1f61e9a
Commit
d1f61e9a
authored
Dec 08, 2019
by
Pamela Osuna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confusion matrix added
parent
e8dab1d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
main.py
+6
-5
No files found.
main.py
View file @
d1f61e9a
import
cnn
import
parser
from
parser
import
parse_data
import
itertools
from
confusion_matrix
import
plot_confusion_matrix
"""
(c,b,e) will be read from the command line or a script
...
...
@@ -23,7 +24,7 @@ combinations = itertools.product(c_,b_,e_)
#parse the data
input_
,
output_
=
parse
r
.
parse
_data
(
n_experiences
)
input_
,
output_
=
parse_data
(
n_experiences
)
#run an specific combination
max_params
=
combinations
[
0
]
...
...
@@ -42,9 +43,9 @@ for params in combinations:
# once we have chosen the optimal parameters we can do the normal kfold
#note: the test data remains unbalanced
acc
,
auc
=
cnn
.
run_kfold
(
X_train_opt
,
X_test_kfold_opt
,
y_train_kfold_opt
,
y_test_kfold_opt
,
max_params
)
acc
,
auc
,
cm
=
cnn
.
run_kfold
(
X_train_opt
,
X_test_kfold_opt
,
y_train_kfold_opt
,
y_test_kfold_opt
,
max_params
)
labels
=
[
'~robust&~evolvable'
,
'evolvable&~robust'
,
'robust&~evolvable'
,
'robust&evolvable'
]
plot_confusion_matrix
(
cm
,
labels
)
## TO DO: create confusion matrix, etc...
## TO DO: code that allows to execute in parallel, make sure it's the same random shuffle ...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment