Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Subsampling
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
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
Josef Brandt
Subsampling
Commits
68561321
Commit
68561321
authored
Apr 17, 2020
by
Josef Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fehlerwurst
parent
ca10567b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
graphs.py
graphs.py
+11
-4
No files found.
graphs.py
View file @
68561321
...
...
@@ -4,7 +4,8 @@ import numpy as np
from
evaluation
import
TotalResults
def
get_error_vs_frac_plot
(
totalResults
:
TotalResults
,
attributes
:
list
=
[],
methods
:
list
=
[])
->
Figure
:
def
get_error_vs_frac_plot
(
totalResults
:
TotalResults
,
attributes
:
list
=
[],
methods
:
list
=
[],
standarddevs
=
True
,
fill
=
True
)
->
Figure
:
if
len
(
attributes
)
==
0
and
len
(
methods
)
!=
0
:
attributes
=
[[]]
*
len
(
methods
)
elif
len
(
methods
)
==
0
and
len
(
attributes
)
!=
0
:
...
...
@@ -31,9 +32,15 @@ def get_error_vs_frac_plot(totalResults: TotalResults, attributes: list = [], me
for
methodLabel
in
errorPerFraction
.
keys
():
errorDict
:
dict
=
errorPerFraction
[
methodLabel
]
fractions
:
list
=
list
(
errorDict
.
keys
())
errors
:
list
=
[
errorDict
[
fraction
][
0
]
for
fraction
in
fractions
]
stdevs
:
list
=
[
errorDict
[
fraction
][
1
]
for
fraction
in
fractions
]
ax
.
errorbar
(
fractions
,
errors
,
stdevs
,
label
=
methodLabel
,
marker
=
's'
,
capsize
=
5
)
errors
:
np
.
ndarray
=
np
.
array
([
errorDict
[
fraction
][
0
]
for
fraction
in
fractions
])
stdevs
:
np
.
ndarray
=
np
.
array
([
errorDict
[
fraction
][
1
]
for
fraction
in
fractions
])
if
not
standarddevs
:
ax
.
plot
(
fractions
,
errors
,
label
=
methodLabel
,
marker
=
's'
)
else
:
line
=
ax
.
errorbar
(
fractions
,
errors
,
stdevs
,
label
=
methodLabel
,
marker
=
's'
,
capsize
=
5
)
if
fill
:
color
=
line
[
0
].
get_color
()
ax
.
fill_between
(
fractions
,
errors
-
stdevs
,
errors
+
stdevs
,
alpha
=
0.2
,
facecolor
=
color
)
title
:
str
=
''
if
len
(
attrs
)
>
0
:
...
...
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