Commit 30df9c86 authored by Caillat Michel's avatar Caillat Michel
Browse files

Added the cumulative distribution function in the method __collectStatistics

parent ee90ef56
......@@ -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("__collectStatistics : exiting")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment