Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
CHILD INTELLIGENT ASSESSMENT TOOL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2020-046
CHILD INTELLIGENT ASSESSMENT TOOL
Commits
798ab1c9
Commit
798ab1c9
authored
Oct 19, 2020
by
MithilaGunasinghe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plot creation - model accuracy against the each epoch
parent
c576de20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
CNNmodel/visulization.py
CNNmodel/visulization.py
+36
-0
No files found.
CNNmodel/visulization.py
0 → 100644
View file @
798ab1c9
'''
Author : Gunasinghe M.D.
IT NUM : IT17043342
'''
import
matplotlib.pyplot
as
plt
import
numpy
as
np
def
plot_model_history
(
model_history
):
fig
,
axs
=
plt
.
subplots
(
1
,
2
,
figsize
=
(
15
,
5
))
# summarize history for accuracy
axs
[
0
]
.
plot
(
range
(
1
,
len
(
model_history
.
history
[
'acc'
])
+
1
),
model_history
.
history
[
'acc'
])
axs
[
0
]
.
plot
(
range
(
1
,
len
(
model_history
.
history
[
'val_acc'
])
+
1
),
model_history
.
history
[
'val_acc'
])
axs
[
0
]
.
set_title
(
'Model Accuracy'
)
axs
[
0
]
.
set_ylabel
(
'Accuracy'
)
axs
[
0
]
.
set_xlabel
(
'Epoch'
)
axs
[
0
]
.
set_xticks
(
np
.
arange
(
1
,
len
(
model_history
.
history
[
'acc'
])
+
1
),
len
(
model_history
.
history
[
'acc'
])
/
10
)
axs
[
0
]
.
legend
([
'train'
,
'val'
],
loc
=
'best'
)
# summarize history for loss
axs
[
1
]
.
plot
(
range
(
1
,
len
(
model_history
.
history
[
'loss'
])
+
1
),
model_history
.
history
[
'loss'
])
axs
[
1
]
.
plot
(
range
(
1
,
len
(
model_history
.
history
[
'val_loss'
])
+
1
),
model_history
.
history
[
'val_loss'
])
axs
[
1
]
.
set_title
(
'Model Loss'
)
axs
[
1
]
.
set_ylabel
(
'Loss'
)
axs
[
1
]
.
set_xlabel
(
'Epoch'
)
axs
[
1
]
.
set_xticks
(
np
.
arange
(
1
,
len
(
model_history
.
history
[
'loss'
])
+
1
),
len
(
model_history
.
history
[
'loss'
])
/
10
)
axs
[
1
]
.
legend
([
'train'
,
'val'
],
loc
=
'best'
)
plt
.
show
()
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