Пример #1
0
 def make_cv_cdf(self, name=''):
     mean = np.array([self.d.value[i][0] for i in range(len(self.d))])
     std = np.array([self.d.value[i][1] for i in range(len(self.d))])
     cv = std / mean
     pmf = Pmf(values=cv,
               probs=self.d.prob,
               name=self.name if self.name else name)
     pmf.sort_by_value()
     return pmf.make_cdf()
Пример #2
0
def make_cdf_from_list(values, name=''):
    pmf = Pmf()
    for value in values:
        pmf.incr(value)
    pmf.normalize()
    return pmf.make_cdf(name=name)