Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fractalis
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fractalis
fractalis
Commits
b5b7ac4c
There was a problem fetching the pipeline mini graph.
Commit
b5b7ac4c
authored
7 years ago
by
Sascha Herzinger
Browse files
Options
Downloads
Patches
Plain Diff
added ANOVA stats to boxplots
parent
8f5ee017
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fractalis/analytics/tasks/boxplot/main.py
+8
-1
8 additions, 1 deletion
fractalis/analytics/tasks/boxplot/main.py
tests/unit/analytics/boxplot/test_boxplot.py
+3
-0
3 additions, 0 deletions
tests/unit/analytics/boxplot/test_boxplot.py
with
11 additions
and
1 deletion
fractalis/analytics/tasks/boxplot/main.py
+
8
−
1
View file @
b5b7ac4c
...
...
@@ -51,6 +51,7 @@ class BoxplotTask(AnalyticTask):
'
categories
'
:
df
[
'
category
'
].
unique
().
tolist
(),
'
subsets
'
:
df
[
'
subset
'
].
unique
().
tolist
()
}
group_values
=
[]
for
feature
in
results
[
'
features
'
]:
for
subset
in
results
[
'
subsets
'
]:
for
category
in
results
[
'
categories
'
]:
...
...
@@ -60,13 +61,19 @@ class BoxplotTask(AnalyticTask):
values
=
[
value
for
value
in
values
if
not
np
.
isnan
(
value
)]
if
len
(
values
)
<
2
:
continue
label
=
'
{}//{}//s{}
'
.
format
(
feature
,
category
,
subset
+
1
)
group_values
.
append
(
values
)
stats
=
self
.
boxplot_statistics
(
values
)
kde
=
scipy
.
stats
.
gaussian_kde
(
values
)
xs
=
np
.
linspace
(
start
=
stats
[
'
l_wsk
'
],
stop
=
stats
[
'
u_wsk
'
],
num
=
100
)
stats
[
'
kde
'
]
=
kde
(
xs
).
tolist
()
label
=
'
{}//{}//s{}
'
.
format
(
feature
,
category
,
subset
+
1
)
results
[
'
statistics
'
][
label
]
=
stats
f_value
,
p_value
=
scipy
.
stats
.
f_oneway
(
*
group_values
)
results
[
'
anova
'
]
=
{
'
p_value
'
:
p_value
,
'
f_value
'
:
f_value
}
return
results
@staticmethod
...
...
This diff is collapsed.
Click to expand it.
tests/unit/analytics/boxplot/test_boxplot.py
+
3
−
0
View file @
b5b7ac4c
...
...
@@ -27,6 +27,9 @@ class TestBoxplotAnalytics:
json
.
dumps
(
results
)
# check if result is json serializable
assert
'
data
'
in
results
assert
'
statistics
'
in
results
assert
'
anova
'
in
results
assert
results
[
'
anova
'
][
'
p_value
'
]
==
1
assert
results
[
'
anova
'
][
'
f_value
'
]
==
0
assert
len
(
json
.
loads
(
results
[
'
data
'
]))
==
8
assert
len
(
results
[
'
statistics
'
])
==
2
assert
'
foo////s1
'
in
results
[
'
statistics
'
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment