Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Caillat Michel
yafits
Commits
30df9c86
Commit
30df9c86
authored
Dec 04, 2019
by
Caillat Michel
Browse files
Added the cumulative distribution function in the method __collectStatistics
parent
ee90ef56
Changes
1
Hide whitespace changes
Inline
Side-by-side
yafitss/DataBlock.py
View file @
30df9c86
...
...
@@ -709,6 +709,13 @@ class DataBlock:
self
.
__statistics
[
key
][
"mean"
]
=
results
[
2
].
item
()
self
.
__statistics
[
key
][
"std"
]
=
results
[
3
].
item
()
self
.
__statistics
[
key
][
"histogram"
]
=
[
x
.
tolist
()
for
x
in
results
[
4
]]
population
=
self
.
__statistics
[
key
][
"histogram"
][
0
]
bins
=
self
.
__statistics
[
key
][
"histogram"
][
1
]
aux
=
[
0
for
x
in
range
(
len
(
bins
))]
for
i
in
range
(
1
,
len
(
aux
)):
aux
[
i
]
=
aux
[
i
-
1
]
+
population
[
i
-
1
]
normfactor
=
reduce
(
lambda
a
,
b
:
a
*
b
,
self
.
__data
.
shape
);
self
.
__statistics
[
key
][
"cumuldist"
]
=
list
(
map
(
lambda
x
:
x
/
normfactor
,
aux
));
self
.
__logger
.
debug
(
self
.
__statistics
[
key
]);
self
.
__logger
.
debug
(
"__collectStatistics : exiting"
)
...
...
Write
Preview
Supports
Markdown
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