Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractalis
Commits
bce808ca
Commit
bce808ca
authored
Jul 26, 2018
by
Sascha Herzinger
Browse files
Adding a couple of additional info to histogram analysis output
parent
fa7b4cbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
fractalis/analytics/tasks/histogram/main.py
View file @
bce808ca
...
...
@@ -65,5 +65,8 @@ class HistogramTask(AnalyticTask):
'variance'
:
variance
}
return
{
'stats'
:
stats
'stats'
:
stats
,
'subsets'
:
subsets
,
'categories'
:
categories
,
'label'
:
df
[
'feature'
].
tolist
()[
0
]
}
tests/unit/analytics/histogram/test_histogram.py
View file @
bce808ca
...
...
@@ -35,7 +35,8 @@ class TestHistogramTask:
subsets
=
[],
data
=
df
,
categories
=
[
cat_df
])
assert
'stats'
in
result
assert
all
([
key
in
result
for
key
in
[
'stats'
,
'subsets'
,
'categories'
,
'label'
]])
assert
'A'
in
result
[
'stats'
]
assert
'B'
in
result
[
'stats'
]
assert
0
in
result
[
'stats'
][
'A'
]
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment